marsadm: fix delete-file --force

This commit is contained in:
Thomas Schoebel-Theuer 2014-01-23 08:02:05 +01:00
parent ab1723f306
commit c7fa35ae5f
1 changed files with 2 additions and 1 deletions

View File

@ -1171,6 +1171,7 @@ sub _wait_delete {
sub delete_file_cmd {
my $cmd = shift;
my $res = shift; # ignore this
foreach my $path (@_) {
check_userspace($path);
_create_delete($path);
@ -1862,7 +1863,7 @@ sub do_all_res {
my $func = shift;
my $cmd = shift;
my $res = shift || "all";
if ($res eq "all" && $cmd !~ m/show|cat|cluster/) {
if ($res eq "all" && $cmd !~ m/show|cat|cluster|set-link|delete-file/) {
ldie "For safety reasons, --force is only allowed on explicitly named resources. Combination of 'all' with --force is disallowed!\n" if $force;
ldie "Cannot combine command '$cmd' with 'all' existing resources - you must explicitly name a single new resource\n" if $cmd =~ m/create|join/;
my $any_success = 0;