]> git.proxmox.com Git - cargo.git/commitdiff
Don't tromp over too many files when downloading the snapshot
authorAlex Crichton <alex@alexcrichton.com>
Sat, 2 Aug 2014 06:31:11 +0000 (23:31 -0700)
committerAlex Crichton <alex@alexcrichton.com>
Sat, 2 Aug 2014 07:16:19 +0000 (00:16 -0700)
src/etc/dl-snapshot.py

index aeee64dfc974ab77637d4cd686f1dc97c31361ec..c167ab50bd8ce61c31d83c1061a503af430e7a89 100644 (file)
@@ -56,6 +56,9 @@ for p in tar.getnames():
     fp = os.path.join(dst, name)
     print("extracting " + p)
     tar.extract(p, dst)
-    shutil.move(os.path.join(dst, p), fp)
+    tp = os.path.join(dst, p)
+    if os.path.isdir(tp) and os.path.exists(fp):
+        continue
+    shutil.move(tp, fp)
 tar.close()
 shutil.rmtree(os.path.join(dst, 'cargo-nightly-' + triple))