From cd8d80c314e03d4117c491b8881f8b68f52f277f Mon Sep 17 00:00:00 2001 From: S Anand Date: Sat, 3 Sep 2016 18:04:15 +0530 Subject: [PATCH] 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. --- patoolib/programs/tar.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/patoolib/programs/tar.py b/patoolib/programs/tar.py index d8d1d36..5a275c2 100644 --- a/patoolib/programs/tar.py +++ b/patoolib/programs/tar.py @@ -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)