diff --git a/share/gitian-updater b/share/gitian-updater index f708493..8894572 100755 --- a/share/gitian-updater +++ b/share/gitian-updater @@ -353,15 +353,15 @@ if quiet == 0: for root, dirs, files in os.walk(unpack_dir, topdown = True): rel = path.relpath(root, unpack_dir) if not path.exists(path.join(dest_path, rel)): - os.mkdir(path.join(dest_path, rel)) + os.mkdir(path.normpath(path.join(dest_path, rel))) for f in files: shutil.copy2(path.join(root, f), path.join(dest_path, rel, f)) -removed = set(old_manifest['sums'].keys()).difference(out_manifest['sums'].keys()) - -for f in removed: - if path.exists(path.join(dest_path, f)): - os.unlink(path.join(dest_path, f)) +if old_manifest: + removed = set(old_manifest['sums'].keys()).difference(out_manifest['sums'].keys()) + for f in removed: + if path.exists(path.join(dest_path, f)): + os.unlink(path.join(dest_path, f)) f = file(path.join(dest_path, '.gitian-manifest'), 'w') yaml.dump(out_manifest, f)