aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHisham Muhammad <hisham@gobolinux.org>2020-04-21 01:15:12 -0300
committerHisham Muhammad <hisham@gobolinux.org>2020-04-21 13:45:50 -0300
commit1a61e5284df50cdccd065424dfcb1975dace4c2d (patch)
treeed2d72002489b28a37b58d27ca3577b22021cfdb
parent7cb7d86dc4ae9b7305c46277cc26ae4d9c645588 (diff)
downloadluafilesystem-1a61e5284df50cdccd065424dfcb1975dace4c2d.tar.gz
luafilesystem-1a61e5284df50cdccd065424dfcb1975dace4c2d.tar.bz2
luafilesystem-1a61e5284df50cdccd065424dfcb1975dace4c2d.zip
win32: strip UNC prefix if present
-rw-r--r--src/lfs.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/lfs.c b/src/lfs.c
index d1bc0e6..5ba2df9 100644
--- a/src/lfs.c
+++ b/src/lfs.c
@@ -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 }