my ($vtype, undef, undef, undef, undef, $isBase, $format) =
PVE::Storage::parse_volname($storage_cfg, $volid);
- if($format ne 'subvol' && ($scfg->{type} eq 'dir' || $scfg->{type} eq 'nfs')) {
+ if (($format ne 'subvol') &&
+ ($scfg->{type} eq 'dir' || $scfg->{type} eq 'nfs')) {
my $path = PVE::Storage::path($storage_cfg, $volid);
my $loopdev;
PVE::Tools::run_command(['losetup', '--find', '--show', $path], outfunc => $parser);
}
}
+
return $loopdevs;
}
return if !$volid || !$mount;
eval {
- my $mount_path = $rootdir.$mount;
+ $rootdir =~ s!/+$!!;
+ my $mount_path = "$rootdir/$mount";
File::Path::mkpath($mount_path);
if ($volid =~ m|^/dev/.+|) {