diff options
author | Tony Cook <tony@develop-help.com> | 2022-11-23 15:08:38 +1100 |
---|---|---|
committer | Tony Cook <tony@develop-help.com> | 2023-01-10 10:14:52 +1100 |
commit | 151ba7cd97faafea3faac82983fc51ddccae06cb (patch) | |
tree | 798cb97194d695923fe7c63c4c4958f55e0cac8b /win32/win32.c | |
parent | ccc99c3cb95087a9b5b6311adbc39759f7e88d3f (diff) | |
download | perl-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.c | 4 |
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] != '/') { |