]> git.proxmox.com Git - pve-storage.git/blobdiff - PVE/Storage.pm
scan_cifs: add workgroup domain independent of user param
[pve-storage.git] / PVE / Storage.pm
index 9ed8c07da71e7fbfe2b92121af292169d5a0ac9b..e2a6fd0f99d007cce4ccf2f2ac6782c6fc0f05ed 100755 (executable)
@@ -1199,10 +1199,10 @@ sub scan_cifs {
     if (defined($user)) {
        die "password is required\n" if !defined($password);
        push @$cmd, '-U', "$user\%$password";
-       push @$cmd, '-W', $domain if defined($domain);
     } else {
        push @$cmd, '-N';
     }
+    push @$cmd, '-W', $domain if defined($domain);
 
     my $res = {};
     my $err = '';