diff options
author | Tony Cook <tony@develop-help.com> | 2018-11-01 13:43:17 +1100 |
---|---|---|
committer | Tony Cook <tony@develop-help.com> | 2019-01-14 12:09:30 +1100 |
commit | 97fc2dfdb6dafd3d20ddc8788a385fc09933df4f (patch) | |
tree | 90c7853450f5e8f61c32ebe764072bbd49db5344 /dist/PathTools | |
parent | 739762602079d68c47cbde3b29275e844d0c92ef (diff) | |
download | perl-97fc2dfdb6dafd3d20ddc8788a385fc09933df4f.tar.gz |
(perl #123724) don't translate ... to ..\.. on Win32
Apparently this was a command.com thing that Win32 doesn't support.
Diffstat (limited to 'dist/PathTools')
-rw-r--r-- | dist/PathTools/lib/File/Spec/Win32.pm | 10 | ||||
-rw-r--r-- | dist/PathTools/t/Spec.t | 4 |
2 files changed, 2 insertions, 12 deletions
diff --git a/dist/PathTools/lib/File/Spec/Win32.pm b/dist/PathTools/lib/File/Spec/Win32.pm index 43f96b892f..b87e529dd1 100644 --- a/dist/PathTools/lib/File/Spec/Win32.pm +++ b/dist/PathTools/lib/File/Spec/Win32.pm @@ -407,16 +407,6 @@ sub _canon_cat # @path -> path )+ # performance boost -- I do not know why }{\\}gx; - # XXX I do not know whether more dots are supported by the OS supporting - # this ... annotation (NetWare or symbian but not MSWin32). - # Then .... could easily become ../../.. etc: - # Replace \.\.\. by (\.\.\.+) and substitute with - # { $1 . ".." . "\\.." x (length($2)-2) }gex - # ... --> ../.. - $path =~ s{ (\A|\\) # at begin or after a slash - \.\.\. - (?=\\|\z) # at end or followed by slash - }{$1..\\..}gx; # xx\yy\..\zz --> xx\zz while ( $path =~ s{(?: (?:\A|\\) # at begin or after a slash diff --git a/dist/PathTools/t/Spec.t b/dist/PathTools/t/Spec.t index 76ade747c7..5f6719067a 100644 --- a/dist/PathTools/t/Spec.t +++ b/dist/PathTools/t/Spec.t @@ -277,9 +277,9 @@ my @tests = ( [ "Win32->canonpath('//a/b/../../c')", '\\\\a\\b\\c' ], [ "Win32->canonpath('//a/b/c/../d')", '\\\\a\\b\\d' ], [ "Win32->canonpath('//a/b/c/../../d')",'\\\\a\\b\\d' ], -[ "Win32->canonpath('//a/b/c/.../d')", '\\\\a\\b\\d' ], +[ "Win32->canonpath('//a/b/c/.../d')", '\\\\a\\b\\c\\...\\d' ], [ "Win32->canonpath('/a/b/c/../../d')", '\\a\\d' ], -[ "Win32->canonpath('/a/b/c/.../d')", '\\a\\d' ], +[ "Win32->canonpath('/a/b/c/.../d')", '\\a\\b\\c\\...\\d' ], [ "Win32->canonpath('\\../temp\\')", '\\temp' ], [ "Win32->canonpath('\\../')", '\\' ], [ "Win32->canonpath('\\..\\')", '\\' ], |