summaryrefslogtreecommitdiff
path: root/win32
diff options
context:
space:
mode:
authorTony Cook <tony@develop-help.com>2022-11-23 16:19:08 +1100
committerTony Cook <tony@develop-help.com>2023-01-10 10:14:52 +1100
commit5c556116d154603005aa8a5880fa0978b46bc81d (patch)
tree575e4ee018f6a8b3c0859cb79ef9a1d08402335f /win32
parent151ba7cd97faafea3faac82983fc51ddccae06cb (diff)
downloadperl-5c556116d154603005aa8a5880fa0978b46bc81d.tar.gz
win32_symlink(): we replace any /, we no longer need to check for them
Diffstat (limited to 'win32')
-rw-r--r--win32/win32.c3
1 files changed, 1 insertions, 2 deletions
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, '\\');