]> git.cworth.org Git - apitrace/commitdiff
tracerepack: Don't fail when temp file is in different filesystem.
authorJosé Fonseca <jfonseca@vmware.com>
Mon, 13 Jun 2011 18:41:31 +0000 (19:41 +0100)
committerJosé Fonseca <jfonseca@vmware.com>
Mon, 13 Jun 2011 18:41:31 +0000 (19:41 +0100)
scripts/tracerepack.py

index 581ee378ee51b9db00a67b0f1a8152f6d0c60c1f..028eb180049c423f41f8666271f013b53f8a0bb8 100755 (executable)
@@ -54,7 +54,7 @@ def repack(in_name):
     print '%u -> %u' % (in_size, out_size)
     
     if out_size < in_size:
-        os.rename(out_name, in_name)
+        shutil.move(out_name, in_name)
     else:
         os.unlink(out_name)