summaryrefslogtreecommitdiff
path: root/win32/win32.c
diff options
context:
space:
mode:
authorTony Cook <tony@develop-help.com>2022-11-23 15:08:38 +1100
committerTony Cook <tony@develop-help.com>2023-01-10 10:14:52 +1100
commit151ba7cd97faafea3faac82983fc51ddccae06cb (patch)
tree798cb97194d695923fe7c63c4c4958f55e0cac8b /win32/win32.c
parentccc99c3cb95087a9b5b6311adbc39759f7e88d3f (diff)
downloadperl-151ba7cd97faafea3faac82983fc51ddccae06cb.tar.gz
win32_symlink: correctly handle linking to abs path to a directory
Fixes #20533
Diffstat (limited to 'win32/win32.c')
-rw-r--r--win32/win32.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/win32/win32.c b/win32/win32.c
index 86ca0511e5..ca99bcd1a0 100644
--- a/win32/win32.c
+++ b/win32/win32.c
@@ -3749,8 +3749,8 @@ win32_symlink(const char *oldfile, const char *newfile)
const char *dest_path = oldfile;
char szTargetName[MAX_PATH+1];
- if (oldfile_len >= 3 && oldfile[1] == ':' && oldfile[2] != '\\' && oldfile[2] != '/') {
- /* relative to current directory on a drive */
+ if (oldfile_len >= 3 && oldfile[1] == ':') {
+ /* relative to current directory on a drive, or absolute */
/* dest_path = oldfile; already done */
}
else if (oldfile[0] != '\\' && oldfile[0] != '/') {