From 5c556116d154603005aa8a5880fa0978b46bc81d Mon Sep 17 00:00:00 2001 From: Tony Cook Date: Wed, 23 Nov 2022 16:19:08 +1100 Subject: win32_symlink(): we replace any /, we no longer need to check for them --- win32/win32.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'win32') diff --git a/win32/win32.c b/win32/win32.c index ca99bcd1a0..8947f0204c 100644 --- a/win32/win32.c +++ b/win32/win32.c @@ -3740,7 +3740,6 @@ win32_symlink(const char *oldfile, const char *newfile) strEQ(oldfile, ".") || (isSLASH(oldfile[oldfile_len-2]) && oldfile[oldfile_len-1] == '.') || strEQ(oldfile+oldfile_len-3, "\\..") || - strEQ(oldfile+oldfile_len-3, "/..") || (oldfile_len == 2 && oldfile[1] == ':')) { create_flags |= SYMBOLIC_LINK_FLAG_DIRECTORY; } @@ -3753,7 +3752,7 @@ win32_symlink(const char *oldfile, const char *newfile) /* relative to current directory on a drive, or absolute */ /* dest_path = oldfile; already done */ } - else if (oldfile[0] != '\\' && oldfile[0] != '/') { + else if (oldfile[0] != '\\') { size_t newfile_len = strlen(newfile); char *last_slash = strrchr(newfile, '/'); char *last_bslash = strrchr(newfile, '\\'); -- cgit v1.2.1