mirror of
https://github.com/Kitware/CMake.git
synced 2026-04-21 21:58:50 -05:00
@@ -200,8 +200,10 @@ 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 cmArchiveWrite::AddPath(const char* path, size_t skip, const char* prefix,
|
||||||
bool recursive)
|
bool recursive)
|
||||||
{
|
{
|
||||||
if (!this->AddFile(path, skip, prefix)) {
|
if (strcmp(path, ".") != 0 || this->Format != "zip") {
|
||||||
return false;
|
if (!this->AddFile(path, skip, prefix)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if ((!cmSystemTools::FileIsDirectory(path) || !recursive) ||
|
if ((!cmSystemTools::FileIsDirectory(path) || !recursive) ||
|
||||||
cmSystemTools::FileIsSymlink(path)) {
|
cmSystemTools::FileIsSymlink(path)) {
|
||||||
@@ -210,6 +212,9 @@ bool cmArchiveWrite::AddPath(const char* path, size_t skip, const char* prefix,
|
|||||||
cmsys::Directory d;
|
cmsys::Directory d;
|
||||||
if (d.Load(path)) {
|
if (d.Load(path)) {
|
||||||
std::string next = cmStrCat(path, '/');
|
std::string next = cmStrCat(path, '/');
|
||||||
|
if (next == "./" && this->Format == "zip") {
|
||||||
|
next.clear();
|
||||||
|
}
|
||||||
std::string::size_type end = next.size();
|
std::string::size_type end = next.size();
|
||||||
unsigned long n = d.GetNumberOfFiles();
|
unsigned long n = d.GetNumberOfFiles();
|
||||||
for (unsigned long i = 0; i < n; ++i) {
|
for (unsigned long i = 0; i < n; ++i) {
|
||||||
|
|||||||
Reference in New Issue
Block a user