mirror of
https://github.com/reactos/CMake.git
synced 2024-11-24 03:59:58 +00:00
Merge topic '7zip-fix'
34413cbf3f
cmArchiveWrite: Remove ./ suffix from 7zip archives
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4311
This commit is contained in:
commit
a19bc6ae39
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user