Fixed bug where --tar produced filenames with duplicate extension

This commit is contained in:
Sebastian Lohff 2012-06-25 19:30:18 +02:00
parent 8274849c8a
commit f48838f63c
1 changed files with 0 additions and 3 deletions

View File

@ -270,13 +270,10 @@ class TarFileHandler(FileBaseHandler):
def getCompressionCmd(self): def getCompressionCmd(self):
if self.compression == "none": if self.compression == "none":
self.fileName += ".tar"
cmd = ["tar", "-c"] cmd = ["tar", "-c"]
elif self.compression == "gzip": elif self.compression == "gzip":
self.fileName += ".tar.gz"
cmd = ["tar", "-cz"] cmd = ["tar", "-cz"]
elif self.compression == "bzip2": elif self.compression == "bzip2":
self.fileName += ".tar.bz2"
cmd = ["tar", "-cj"] cmd = ["tar", "-cj"]
else: else:
raise ValueError("Unknown compression mode '%s'." % self.compression) raise ValueError("Unknown compression mode '%s'." % self.compression)