win32: strip UNC prefix if present

This commit is contained in:
Hisham Muhammad
2020-04-21 01:15:12 -03:00
parent 7cb7d86dc4
commit 1a61e5284d

View File

@@ -953,6 +953,12 @@ static int push_link_target(lua_State *L) {
break; break;
} }
if (tsize < size) { if (tsize < size) {
#ifdef _WIN32
if (tsize > 4 && strncmp(target, "\\\\?\\", 4) == 0) {
memmove_s(target, tsize - 3, target + 4, tsize - 3);
tsize -= 4;
}
#endif
ok = 1; ok = 1;
break; break;
} }