changeset 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 e2db2913123d
children dace84448c25
files carton.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
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()