mirror of
https://github.com/amadvance/snapraid.git
synced 2026-11-28 19:06:42 -05:00
In Windows readlink now convert \ to / to match symlink behaviour
This commit is contained in:
parent
b20dc395e9
commit
91075e1e65
1 changed files with 6 additions and 0 deletions
|
|
@ -1916,6 +1916,12 @@ int windows_readlink(const char* file, char* buffer, size_t size)
|
||||||
|
|
||||||
memcpy(buffer, name, len);
|
memcpy(buffer, name, len);
|
||||||
|
|
||||||
|
/* convert any \ to / */
|
||||||
|
for (size_t i = 0; i < len; ++i) {
|
||||||
|
if (buffer[i] == '\\')
|
||||||
|
buffer[i] = '/';
|
||||||
|
}
|
||||||
|
|
||||||
return len;
|
return len;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue