fix bug #171: fix path_to_volume_id for unmounted NFS

This commit is contained in:
Dietmar Maurer
2012-04-18 12:34:39 +02:00
parent 369977e8bb
commit 75d75990b4
3 changed files with 10 additions and 2 deletions

View File

@ -1018,7 +1018,9 @@ sub path_to_volume_id {
return ('');
}
$path = abs_path ($path);
# Note: abs_path() return undef if $path doesn not exist
# for example when nfs storage is not mounted
$path = abs_path($path) || $path;
foreach my $sid (keys %$ids) {
my $type = $ids->{$sid}->{type};