forked from seba/servefile
Fixed bug where --tar produced filenames with duplicate extension
This commit is contained in:
parent
8274849c8a
commit
f48838f63c
|
@ -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)
|
||||||
|
|
Loading…
Reference in New Issue