diff options
author | Olivier Thauvin <nanardon@mandriva.org> | 2004-12-14 00:22:30 +0000 |
---|---|---|
committer | Olivier Thauvin <nanardon@mandriva.org> | 2004-12-14 00:22:30 +0000 |
commit | 6a3b3807d8ff31d6214475555b7fee2981d61a45 (patch) | |
tree | 7b7eee257927143cda27b32fc8723d927c1e6832 /Packdrakeng.pm | |
parent | 713e1c24d769bde79a146239ae324ccf74b31929 (diff) | |
download | rpmtools-6a3b3807d8ff31d6214475555b7fee2981d61a45.tar rpmtools-6a3b3807d8ff31d6214475555b7fee2981d61a45.tar.gz rpmtools-6a3b3807d8ff31d6214475555b7fee2981d61a45.tar.bz2 rpmtools-6a3b3807d8ff31d6214475555b7fee2981d61a45.tar.xz rpmtools-6a3b3807d8ff31d6214475555b7fee2981d61a45.zip |
- 5.0.3
- fix mkpath
Diffstat (limited to 'Packdrakeng.pm')
-rw-r--r-- | Packdrakeng.pm | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Packdrakeng.pm b/Packdrakeng.pm index 98956c6..b45e04a 100644 --- a/Packdrakeng.pm +++ b/Packdrakeng.pm @@ -18,7 +18,7 @@ package Packdrakeng; use strict; use warnings; -use POSIX qw(O_WRONLY O_TRUNC O_CREAT O_RDONLY); +use POSIX qw(O_WRONLY O_TRUNC O_CREAT O_RDONLY O_APPEND); (our $VERSION) = q$Id$ =~ /(\d+\.\d+)/; @@ -43,10 +43,10 @@ sub tempfile { sub mkpath { my ($path) = @_; $path =~ s:/*$::; # removing leading '/' - my $parent = substr($path, 0, length($path) - rindex($path, '/')+1); + my $parent = substr($path, 0, rindex($path, '/')); -d $path and return 1; -d $parent || mkpath($parent) or return 0; - mkdir($path); + mkdir($path) } sub _new { |