Branch: refs/heads/blead Home: https://github.com/Perl/perl5 Commit: e1f63293b298ecf97a25649bc448e78df4452b19 https://github.com/Perl/perl5/commit/e1f63293b298ecf97a25649bc448e78df4452b19 Author: Craig A. Berry <craigbe...@mac.com> Date: 2024-09-10 (Tue, 10 Sep 2024)
Changed paths: M dist/PathTools/lib/File/Spec.pm M dist/PathTools/lib/File/Spec/AmigaOS.pm M dist/PathTools/lib/File/Spec/Cygwin.pm M dist/PathTools/lib/File/Spec/Epoc.pm M dist/PathTools/lib/File/Spec/Functions.pm M dist/PathTools/lib/File/Spec/Mac.pm M dist/PathTools/lib/File/Spec/OS2.pm M dist/PathTools/lib/File/Spec/Unix.pm M dist/PathTools/lib/File/Spec/VMS.pm M dist/PathTools/lib/File/Spec/Win32.pm Log Message: ----------- File::Spec::VMS->rel2abs: handle bareword base The second argument to rel2abs is a base directory to be included in the resulting absolute path. On VMS, this worked if the base argument had any sort of delmiters in either Unix or VMS format, but not for a bare directory name. '[.lib]' or './lib' were ok, but 'lib' simply got dropped from the output. So make sure base gets treated like a directory unless it already unambiguously looks like one. This imitates what abs2rel already does and uses it to replace the backwards implementation that was in rel2abs; rather than converting base to a native path only when we see signs of a Unix path, we now do so when we do NOT already see signs of a native path, which includes the bareword case. This can't reasonably be tested with File::Spec's current testing infrastructure because the result depends on the value of Cwd::cwd(). The broken behavior looked like this: $ perl -"MFile::Spec" -e "print File::Spec->rel2abs('Test.pm', 'lib');" DKA0:[DIR1.DIR2]Test.pm but we'll now get: $ perl -"MFile::Spec" -e "print File::Spec->rel2abs('Test.pm', 'lib');" DKA0:[DIR1.DIR2.lib]Test.pm To unsubscribe from these emails, change your notification settings at https://github.com/Perl/perl5/settings/notifications