]> git.proxmox.com Git - pve-container.git/commitdiff
code cleanup
authorDietmar Maurer <dietmar@proxmox.com>
Wed, 26 Aug 2015 07:01:45 +0000 (09:01 +0200)
committerDietmar Maurer <dietmar@proxmox.com>
Wed, 26 Aug 2015 07:01:45 +0000 (09:01 +0200)
src/PVE/LXC.pm

index d1a4ea690521f0c0cdf0416c40aa531487aa5eed..28cde3ba53156aafb973d792353fae1c759091fa 100644 (file)
@@ -1883,7 +1883,8 @@ sub attach_loops {
        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;
 
@@ -1896,6 +1897,7 @@ sub attach_loops {
            PVE::Tools::run_command(['losetup', '--find', '--show', $path], outfunc => $parser);
        }
     }
+
     return $loopdevs;
 }
 
@@ -1931,7 +1933,8 @@ sub mountpoint_mount {
     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/.+|) {