Perl wrapper: Use rmtree for actual deletion

pull/3670/head
Oliver Günther 9 years ago
parent cd436b40a3
commit 4057250b5c
  1. 4
      extra/Apache/OpenProjectRepoman.pm

@ -3,7 +3,7 @@ package Apache::OpenProjectRepoman;
use strict; use strict;
use warnings FATAL => 'all', NONFATAL => 'redefine'; use warnings FATAL => 'all', NONFATAL => 'redefine';
use File::Path qw(remove_tree); use File::Path qw(rmtree);
use File::Spec (); use File::Spec ();
use Apache2::Module; use Apache2::Module;
@ -61,7 +61,7 @@ sub create_repository {
# Removes the repository with a given identifier on disk. # Removes the repository with a given identifier on disk.
sub delete_repository { sub delete_repository {
my ($r, $vendor, $repository) = @_; my ($r, $vendor, $repository) = @_;
remove_tree($repository, { safe => 1 }) if -d $repository; rmtree($repository) if -d $repository;
} }
## ##

Loading…
Cancel
Save