aboutsummaryrefslogtreecommitdiff
path: root/bpkg/archive.cxx
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2016-05-29 01:23:34 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2016-05-31 19:14:39 +0300
commit3d18446acef5462e946fe79909b198b35c2bbfa0 (patch)
treeeb60dab710569543bb8dd314e63eda745a4c166c /bpkg/archive.cxx
parent45e82ae43be6444b0260daaf08eeb084eddbdb34 (diff)
Port to MinGW
Diffstat (limited to 'bpkg/archive.cxx')
-rw-r--r--bpkg/archive.cxx14
1 files changed, 13 insertions, 1 deletions
diff --git a/bpkg/archive.cxx b/bpkg/archive.cxx
index b0c7ab7..0edf09d 100644
--- a/bpkg/archive.cxx
+++ b/bpkg/archive.cxx
@@ -48,9 +48,21 @@ namespace bpkg
//
args.push_back ("-O");
+ // An archive name that has a colon in it specifies a file or device on a
+ // remote machine. That makes it impossible to use absolute Windows paths
+ // unless we add the --force-local option.
+ //
+ args.push_back ("--force-local");
+
args.push_back ("-xf");
args.push_back (a.string ().c_str ());
- args.push_back (f.string ().c_str ());
+
+ // MSYS tar doesn't find archived file if it's path is provided in Windows
+ // notation.
+ //
+ string fs (f.posix_string ());
+ args.push_back (fs.c_str ());
+
args.push_back (nullptr);
if (verb >= 2)