# HG changeset patch # User Jeff Hammel # Date 1310348262 25200 # Node ID e6ee0410ceef8daf0eeed6234e1867079494f35f # Parent e2db2913123d509c9ded88c693e7e088f309d576 fix bug where os.path.sep is wrongly interpreted diff -r e2db2913123d -r e6ee0410ceef carton.py --- 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()