In perl.git, the branch vincent/normalize_unix_catfile has been created
<http://perl5.git.perl.org/perl.git/commitdiff/1105e6797c25465eb4a230147a417b9272b66e4e?hp=0000000000000000000000000000000000000000>
at 1105e6797c25465eb4a230147a417b9272b66e4e (commit)
- Log -----------------------------------------------------------------
commit 1105e6797c25465eb4a230147a417b9272b66e4e
Author: Vincent Pit <[email protected]>
Date: Fri Jun 29 17:33:03 2012 +0200
File::Spec::Unix::catfile() should preserve a leading ./
This makes File::Spec::Unix::catfile('./a') and catfile('.', 'a') both
return './a' (the former used to return 'a'), while catfile('a') still
returns 'a'. This way, catfile() is more consistent, in that it really
concatenates its arguments. Repeated slashes and ./ inside the path
are still stripped.
Another consistent solution would have been to apply canonpath() before
returning the concatenated path, but this would have removed a leading
./ and it is sometimes necessary to force it (e.g. when you want to pass
the path to system()).
As a result of this change, catdir() and canonpath() are no longer
called by catfile(),
This fixes RT #113898.
-----------------------------------------------------------------------
--
Perl5 Master Repository