Diff for perl-modules/Platon/File/Spec/Unix.pm between version 1.1 and 1.2
| version 1.1, 2005/07/19 19:12:49 |
version 1.2, 2005/07/19 19:42:32 |
|
|
| # 2005-07-19 - created |
# 2005-07-19 - created |
| # |
# |
| |
|
| # $Platon$ |
# $Platon: perl-modules/Platon/File/Spec/Unix.pm,v 1.1 2005/07/19 19:12:49 rajo Exp $ |
| |
|
| package Platon::File::Spec::Unix; |
package Platon::File::Spec::Unix; |
| |
|
| Line 52 sub canonpath { # {{{ |
|
| Line 52 sub canonpath { # {{{ |
|
| $path =~ s|^/(\.\./)+|/|s; # /../../xx -> xx |
$path =~ s|^/(\.\./)+|/|s; # /../../xx -> xx |
| |
|
| # added by Lubonir Host 'rajo' <rajo AT platon.sk> |
# added by Lubonir Host 'rajo' <rajo AT platon.sk> |
| $path =~ s|([^/]+)/(\.\./)+||g; # xx/yy/../xx -> xx/xx |
$path =~ s|([^/]+)/(\.\./)+||g; # xx/yy/../xx -> xx/xx |
| |
|
| $path =~ s|/\Z(?!\n)|| unless $path eq "/"; # xx/ -> xx |
$path =~ s|/\Z(?!\n)|| unless $path eq "/"; # xx/ -> xx |
| return "$node$path"; |
return "$node$path"; |
Platon Group <platon@platon.org> http://platon.org/
|
|