followup: free_image: just check if a file in general exist
don't require any specific file types, if something is here which can be requested to delete over API/CLI it either comes from an API/CLI operation and should be thus OK to delete, else a user caused the creation of the special file and it either works and all is good or the user gets notified as we check if unlink succeeded anyway Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
@ -689,8 +689,7 @@ sub free_image {
|
||||
if (defined($format) && ($format eq 'subvol')) {
|
||||
File::Path::remove_tree($path);
|
||||
} else {
|
||||
|
||||
if (! (-f $path || -l $path)) {
|
||||
if (! -e $path) {
|
||||
warn "disk image '$path' does not exists\n";
|
||||
return undef;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user