diff options
author | Hisham Muhammad <hisham@gobolinux.org> | 2020-04-21 01:15:12 -0300 |
---|---|---|
committer | Hisham Muhammad <hisham@gobolinux.org> | 2020-04-21 13:45:50 -0300 |
commit | 1a61e5284df50cdccd065424dfcb1975dace4c2d (patch) | |
tree | ed2d72002489b28a37b58d27ca3577b22021cfdb | |
parent | 7cb7d86dc4ae9b7305c46277cc26ae4d9c645588 (diff) | |
download | luafilesystem-1a61e5284df50cdccd065424dfcb1975dace4c2d.tar.gz luafilesystem-1a61e5284df50cdccd065424dfcb1975dace4c2d.tar.bz2 luafilesystem-1a61e5284df50cdccd065424dfcb1975dace4c2d.zip |
win32: strip UNC prefix if present
-rw-r--r-- | src/lfs.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -953,6 +953,12 @@ static int push_link_target(lua_State *L) { | |||
953 | break; | 953 | break; |
954 | } | 954 | } |
955 | if (tsize < size) { | 955 | if (tsize < size) { |
956 | #ifdef _WIN32 | ||
957 | if (tsize > 4 && strncmp(target, "\\\\?\\", 4) == 0) { | ||
958 | memmove_s(target, tsize - 3, target + 4, tsize - 3); | ||
959 | tsize -= 4; | ||
960 | } | ||
961 | #endif | ||
956 | ok = 1; | 962 | ok = 1; |
957 | break; | 963 | break; |
958 | } | 964 | } |