diff options
author | Brad King <brad.king@kitware.com> | 2020-02-03 16:49:31 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2020-02-03 16:49:39 (GMT) |
commit | a19bc6ae39ecaffe55a44a47d05c7189706aec1d (patch) | |
tree | ba2583bc8e2ca877040c94829a95249057ed55a3 | |
parent | adf5524689d7621fa363a6d456c1e3de561b3688 (diff) | |
parent | 34413cbf3f578971b66da3fbf24539656d850b33 (diff) | |
download | CMake-a19bc6ae39ecaffe55a44a47d05c7189706aec1d.zip CMake-a19bc6ae39ecaffe55a44a47d05c7189706aec1d.tar.gz CMake-a19bc6ae39ecaffe55a44a47d05c7189706aec1d.tar.bz2 |
Merge topic '7zip-fix'
34413cbf3f cmArchiveWrite: Remove ./ suffix from 7zip archives
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4311
-rw-r--r-- | Source/cmArchiveWrite.cxx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Source/cmArchiveWrite.cxx b/Source/cmArchiveWrite.cxx index f8d1aa7..d29b2ac 100644 --- a/Source/cmArchiveWrite.cxx +++ b/Source/cmArchiveWrite.cxx @@ -200,7 +200,8 @@ bool cmArchiveWrite::Add(std::string path, size_t skip, const char* prefix, bool cmArchiveWrite::AddPath(const char* path, size_t skip, const char* prefix, bool recursive) { - if (strcmp(path, ".") != 0 || this->Format != "zip") { + if (strcmp(path, ".") != 0 || + (this->Format != "zip" && this->Format != "7zip")) { if (!this->AddFile(path, skip, prefix)) { return false; } @@ -212,7 +213,7 @@ bool cmArchiveWrite::AddPath(const char* path, size_t skip, const char* prefix, cmsys::Directory d; if (d.Load(path)) { std::string next = cmStrCat(path, '/'); - if (next == "./" && this->Format == "zip") { + if (next == "./" && (this->Format == "zip" || this->Format == "7zip")) { next.clear(); } std::string::size_type end = next.size(); |