diff carton.py @ 26:e6ee0410ceef

fix bug where os.path.sep is wrongly interpreted
author Jeff Hammel <jhammel@mozilla.com>
date Sun, 10 Jul 2011 18:37:42 -0700
parents bb19d3dac4c5
children dace84448c25
line wrap: on
line diff
--- a/carton.py	Sun Jul 10 18:23:28 2011 -0700
+++ b/carton.py	Sun Jul 10 18:37:42 2011 -0700
@@ -208,7 +208,7 @@
                 # add other sources (files and directories) to the archive
                 source_buffer = StringIO()
                 source_tar = tarfile.open(mode="w:gz", fileobj=source_buffer)
-                source_tar.add(source, arcname=os.path.basename(source))
+                source_tar.add(source, arcname=os.path.basename(source.rstrip(os.path.sep)))
                 source_tar.close()
                 buffer = source_buffer.getvalue()