mirror of
https://github.com/schoebel/mars
synced 2024-12-13 10:15:34 +00:00
marsadm: fix delete-file --force
This commit is contained in:
parent
ab1723f306
commit
c7fa35ae5f
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user