From a7d1814ceda85bd0eb0b4cbb0359b1a4413ff517 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Fri, 2 Sep 2016 17:03:03 +0300 Subject: Only use tar --force-local argument on Windows --- bpkg/archive.cxx | 5 ++++- bpkg/pkg-unpack.cxx | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/bpkg/archive.cxx b/bpkg/archive.cxx index f0596bf..7bc4740 100644 --- a/bpkg/archive.cxx +++ b/bpkg/archive.cxx @@ -50,9 +50,12 @@ namespace bpkg // 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. + // unless we add the --force-local option. Note that BSD tar doesn't + // support this option. // +#ifdef _WIN32 args.push_back ("--force-local"); +#endif args.push_back ("-xf"); args.push_back (a.string ().c_str ()); diff --git a/bpkg/pkg-unpack.cxx b/bpkg/pkg-unpack.cxx index 84a4618..53c3faf 100644 --- a/bpkg/pkg-unpack.cxx +++ b/bpkg/pkg-unpack.cxx @@ -177,9 +177,12 @@ namespace bpkg // 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. + // unless we add the --force-local option. Note that BSD tar doesn't + // support this option. // +#ifdef _WIN32 args.push_back ("--force-local"); +#endif args.push_back ("-xf"); args.push_back (a.string ().c_str ()); -- cgit v1.1