diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2001-09-16 15:22:14 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2001-09-16 15:22:14 +0000 |
commit | a82b2e32ac2f198f7176c33ac14383192c5ab37a (patch) | |
tree | 5ad09ab58ad185aee7ed4c0194b971360d2d3316 /perl-install/devices.pm | |
parent | 6fc84b8053b15e3bf000f5de26f81f55a622fa40 (diff) | |
download | drakx-backup-do-not-use-a82b2e32ac2f198f7176c33ac14383192c5ab37a.tar drakx-backup-do-not-use-a82b2e32ac2f198f7176c33ac14383192c5ab37a.tar.gz drakx-backup-do-not-use-a82b2e32ac2f198f7176c33ac14383192c5ab37a.tar.bz2 drakx-backup-do-not-use-a82b2e32ac2f198f7176c33ac14383192c5ab37a.tar.xz drakx-backup-do-not-use-a82b2e32ac2f198f7176c33ac14383192c5ab37a.zip |
(make): ensure it never returns a non-absolute name
(it happened with make("foo") when cwd=/dev and /dev/foo existed)
Diffstat (limited to 'perl-install/devices.pm')
-rw-r--r-- | perl-install/devices.pm | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/perl-install/devices.pm b/perl-install/devices.pm index 15f470e47..80f749921 100644 --- a/perl-install/devices.pm +++ b/perl-install/devices.pm @@ -136,8 +136,8 @@ sub make($) { if (m,^(.*/(?:dev|tmp))/(.*),) { $_ = $2; } else { - -e $file or $file = "/tmp/$_"; - -e $file or $file = "/dev/$_"; + $file =~ m|^/| && -e $file or $file = "/tmp/$_"; + $file =~ m|^/| && -e $file or $file = "/dev/$_"; } -e $file and return $file; #- assume nobody takes fun at creating files named as device |