fix #2226: allow broken symlinks to be deleted via API
Symlinks with a non-existing target fail Perls '-f' test and were thus not deleteable via the API (failing with '$path does not exist'). Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
This commit is contained in:
committed by
Thomas Lamprecht
parent
5f73686fd3
commit
26f14f6b07
@ -689,8 +689,8 @@ sub free_image {
|
||||
if (defined($format) && ($format eq 'subvol')) {
|
||||
File::Path::remove_tree($path);
|
||||
} else {
|
||||
|
||||
if (! -f $path) {
|
||||
|
||||
if (! (-f $path || -l $path)) {
|
||||
warn "disk image '$path' does not exists\n";
|
||||
return undef;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user