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:
S Anand 2016-09-03 18:04:15 +05:30 committed by Yaroslav Halchenko
parent 087cd9ee33
commit cd8d80c314
1 changed files with 3 additions and 3 deletions

View File

@ -19,14 +19,14 @@ import os
def extract_tar (archive, compression, cmd, verbosity, interactive, outdir):
"""Extract a TAR archive."""
cmdlist = [cmd, '--extract']
cmdlist = [cmd, '--force-local', '--extract']
add_tar_opts(cmdlist, compression, verbosity)
cmdlist.extend(["--file", archive, '--directory', outdir])
return cmdlist
def list_tar (archive, compression, cmd, verbosity, interactive):
"""List a TAR archive."""
cmdlist = [cmd, '--list']
cmdlist = [cmd, '--force-local', '--list']
add_tar_opts(cmdlist, compression, verbosity)
cmdlist.extend(["--file", archive])
return cmdlist
@ -35,7 +35,7 @@ test_tar = list_tar
def create_tar (archive, compression, cmd, verbosity, interactive, filenames):
"""Create a TAR archive."""
cmdlist = [cmd, '--create']
cmdlist = [cmd, '--force-local', '--create']
add_tar_opts(cmdlist, compression, verbosity)
cmdlist.extend(["--file", archive, '--'])
cmdlist.extend(filenames)