btrfs: volume import: fix check for presence of base snapshot
For a 'raw' volume, the path includes the '/disk.raw' suffix, but the check expects the containing subvolume directory. Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
This commit is contained in:
committed by
Thomas Lamprecht
parent
0e58fffcc2
commit
2ef1d256e7
@ -824,6 +824,7 @@ sub volume_import {
|
||||
|
||||
if (defined($base_snapshot)) {
|
||||
my $path = $class->path($scfg, $volname, $storeid, $base_snapshot);
|
||||
$path = raw_file_to_subvol($path) if $volume_format eq 'raw';
|
||||
die "base snapshot '$base_snapshot' not found - no such directory '$path'\n"
|
||||
if !path_is_subvolume($path);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user