From: Jelmer Vernooij Date: Sun, 26 Feb 2012 23:53:19 +0000 (+0100) Subject: upgradeprovision: Only backup sysvol directory if it exists. X-Git-Tag: tdb-1.2.10~591 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=2c9ff8a4d7d9217d69a7c4abdd4b776d138f9951;p=thirdparty%2Fsamba.git upgradeprovision: Only backup sysvol directory if it exists. This is not the case for standalone installations. Bug: https://bugs.launchpad.net/samba/+bug/930370 Bug: https://bugzilla.samba.org/show_bug.cgi?id=8781 --- diff --git a/source4/scripting/bin/upgradeprovision b/source4/scripting/bin/upgradeprovision index ba9e5e5c0ac..8066ac38d48 100755 --- a/source4/scripting/bin/upgradeprovision +++ b/source4/scripting/bin/upgradeprovision @@ -1471,7 +1471,8 @@ def backup_provision(paths, dir): :param paths: Paths to different objects :param dir: Directory where to store the backup """ - copytree_with_xattrs(paths.sysvol, os.path.join(dir, "sysvol")) + if paths.sysvol is not None: + copytree_with_xattrs(paths.sysvol, os.path.join(dir, "sysvol")) shutil.copy2(paths.samdb, dir) shutil.copy2(paths.secrets, dir) shutil.copy2(paths.idmapdb, dir)