diff options
author | Gurusamy Sarathy <gsar@cpan.org> | 2000-03-03 02:58:49 +0000 |
---|---|---|
committer | Gurusamy Sarathy <gsar@cpan.org> | 2000-03-03 02:58:49 +0000 |
commit | 1d7cb664dc49858d069c4ad7e05c059b1003a3cd (patch) | |
tree | 5011b226abbbccd9eae978808b9851f000afcea6 | |
parent | 206483f1ebeef33f7da74d5c167b3fd37bbf2d6b (diff) | |
download | perl-1d7cb664dc49858d069c4ad7e05c059b1003a3cd.tar.gz |
File::Spec bugs (spotted by Hack Kampbjorn <hack@hackdata.com>)
p4raw-id: //depot/perl@5472
-rw-r--r-- | lib/File/Spec/Mac.pm | 4 | ||||
-rw-r--r-- | lib/File/Spec/Unix.pm | 4 | ||||
-rw-r--r-- | lib/File/Spec/VMS.pm | 8 | ||||
-rw-r--r-- | lib/File/Spec/Win32.pm | 12 |
4 files changed, 14 insertions, 14 deletions
diff --git a/lib/File/Spec/Mac.pm b/lib/File/Spec/Mac.pm index be9a43cb78..959e33d0cf 100644 --- a/lib/File/Spec/Mac.pm +++ b/lib/File/Spec/Mac.pm @@ -343,8 +343,8 @@ sub abs2rel { Converts a relative path to an absolute path. - $abs_path = $File::Spec->rel2abs( $destination ) ; - $abs_path = $File::Spec->rel2abs( $destination, $base ) ; + $abs_path = File::Spec->rel2abs( $destination ) ; + $abs_path = File::Spec->rel2abs( $destination, $base ) ; If $base is not present or '', then L<cwd()> is used. If $base is relative, then it is converted to absolute form using L</rel2abs()>. This means that it diff --git a/lib/File/Spec/Unix.pm b/lib/File/Spec/Unix.pm index f4e9f27bd1..0cbc8c7e57 100644 --- a/lib/File/Spec/Unix.pm +++ b/lib/File/Spec/Unix.pm @@ -383,8 +383,8 @@ sub abs2rel { Converts a relative path to an absolute path. - $abs_path = $File::Spec->rel2abs( $destination ) ; - $abs_path = $File::Spec->rel2abs( $destination, $base ) ; + $abs_path = File::Spec->rel2abs( $destination ) ; + $abs_path = File::Spec->rel2abs( $destination, $base ) ; If $base is not present or '', then L<cwd()> is used. If $base is relative, then it is converted to absolute form using L</rel2abs()>. This means that it diff --git a/lib/File/Spec/VMS.pm b/lib/File/Spec/VMS.pm index 52519b953f..9514dd74b5 100644 --- a/lib/File/Spec/VMS.pm +++ b/lib/File/Spec/VMS.pm @@ -485,12 +485,12 @@ sub abs2rel { } # Figure out the effective $base and clean it up. - if ( ! $self->file_name_is_absolute( $base ) ) { - $base = $self->rel2abs( $base ) ; - } - elsif ( !defined( $base ) || $base eq '' ) { + if ( !defined( $base ) || $base eq '' ) { $base = cwd() ; } + elsif ( ! $self->file_name_is_absolute( $base ) ) { + $base = $self->rel2abs( $base ) ; + } else { $base = $self->canonpath( $base ) ; } diff --git a/lib/File/Spec/Win32.pm b/lib/File/Spec/Win32.pm index 85a71a23a3..aa95fbde36 100644 --- a/lib/File/Spec/Win32.pm +++ b/lib/File/Spec/Win32.pm @@ -341,8 +341,8 @@ sub abs2rel { Converts a relative path to an absolute path. - $abs_path = $File::Spec->rel2abs( $destination ) ; - $abs_path = $File::Spec->rel2abs( $destination, $base ) ; + $abs_path = File::Spec->rel2abs( $destination ) ; + $abs_path = File::Spec->rel2abs( $destination, $base ) ; If $base is not present or '', then L<cwd()> is used. If $base is relative, then it is converted to absolute form using L</rel2abs()>. This means that it @@ -368,12 +368,12 @@ sub rel2abs($;$;) { if ( ! $self->file_name_is_absolute( $path ) ) { - if ( ! $self->file_name_is_absolute( $base ) ) { - $base = $self->rel2abs( $base ) ; - } - elsif ( !defined( $base ) || $base eq '' ) { + if ( !defined( $base ) || $base eq '' ) { $base = cwd() ; } + elsif ( ! $self->file_name_is_absolute( $base ) ) { + $base = $self->rel2abs( $base ) ; + } else { $base = $self->canonpath( $base ) ; } |