tar treats Windows paths (D:\file.tar) as local files. Fixes #42
Apparently tar has capabilities for the extraction from remote locations but in my (@yarikoptic) experience I have never ran into someone using it since it requires some rmt server to be running etc. So let's just favor for files containing columns which are not generally forbidden.
This commit is contained in:
parent
087cd9ee33
commit
cd8d80c314
|
@ -19,14 +19,14 @@ import os
|
||||||
|
|
||||||
def extract_tar (archive, compression, cmd, verbosity, interactive, outdir):
|
def extract_tar (archive, compression, cmd, verbosity, interactive, outdir):
|
||||||
"""Extract a TAR archive."""
|
"""Extract a TAR archive."""
|
||||||
cmdlist = [cmd, '--extract']
|
cmdlist = [cmd, '--force-local', '--extract']
|
||||||
add_tar_opts(cmdlist, compression, verbosity)
|
add_tar_opts(cmdlist, compression, verbosity)
|
||||||
cmdlist.extend(["--file", archive, '--directory', outdir])
|
cmdlist.extend(["--file", archive, '--directory', outdir])
|
||||||
return cmdlist
|
return cmdlist
|
||||||
|
|
||||||
def list_tar (archive, compression, cmd, verbosity, interactive):
|
def list_tar (archive, compression, cmd, verbosity, interactive):
|
||||||
"""List a TAR archive."""
|
"""List a TAR archive."""
|
||||||
cmdlist = [cmd, '--list']
|
cmdlist = [cmd, '--force-local', '--list']
|
||||||
add_tar_opts(cmdlist, compression, verbosity)
|
add_tar_opts(cmdlist, compression, verbosity)
|
||||||
cmdlist.extend(["--file", archive])
|
cmdlist.extend(["--file", archive])
|
||||||
return cmdlist
|
return cmdlist
|
||||||
|
@ -35,7 +35,7 @@ test_tar = list_tar
|
||||||
|
|
||||||
def create_tar (archive, compression, cmd, verbosity, interactive, filenames):
|
def create_tar (archive, compression, cmd, verbosity, interactive, filenames):
|
||||||
"""Create a TAR archive."""
|
"""Create a TAR archive."""
|
||||||
cmdlist = [cmd, '--create']
|
cmdlist = [cmd, '--force-local', '--create']
|
||||||
add_tar_opts(cmdlist, compression, verbosity)
|
add_tar_opts(cmdlist, compression, verbosity)
|
||||||
cmdlist.extend(["--file", archive, '--'])
|
cmdlist.extend(["--file", archive, '--'])
|
||||||
cmdlist.extend(filenames)
|
cmdlist.extend(filenames)
|
||||||
|
|
Loading…
Reference in New Issue