This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
PathTools: use PerlLIO_*() functions and chdir() on a symlink differences
authorTony Cook <tony@develop-help.com>
Wed, 7 Oct 2020 00:50:55 +0000 (11:50 +1100)
committerTony Cook <tony@develop-help.com>
Tue, 1 Dec 2020 04:29:33 +0000 (15:29 +1100)
commit12a8085aee9a1a5ac613205b43ea06406736ac6b
tree74c23d485178fe9cb995fbb2c5e564c72d22449c
parente935ef333b3eab54a766de93fad1369f76ddea49
PathTools: use PerlLIO_*() functions and chdir() on a symlink differences

Use PerlLIO_lstat() and PerlLIO_readlink() instead of directly calling
the POSIX names, so our Win32 overrides work.

For the test, unlike POSIX, changing directory via a symlink on Win32
appears to store the symlink as part of the current directory rather
so GetCurrentDirectory() fetches that rather than the hardlinked path.
13 files changed:
dist/PathTools/Cwd.pm
dist/PathTools/Cwd.xs
dist/PathTools/lib/File/Spec.pm
dist/PathTools/lib/File/Spec/AmigaOS.pm
dist/PathTools/lib/File/Spec/Cygwin.pm
dist/PathTools/lib/File/Spec/Epoc.pm
dist/PathTools/lib/File/Spec/Functions.pm
dist/PathTools/lib/File/Spec/Mac.pm
dist/PathTools/lib/File/Spec/OS2.pm
dist/PathTools/lib/File/Spec/Unix.pm
dist/PathTools/lib/File/Spec/VMS.pm
dist/PathTools/lib/File/Spec/Win32.pm
dist/PathTools/t/cwd.t