diff --git a/Source/cmArchiveWrite.cxx b/Source/cmArchiveWrite.cxx index eab8a592a..dc6b749b2 100644 --- a/Source/cmArchiveWrite.cxx +++ b/Source/cmArchiveWrite.cxx @@ -247,10 +247,14 @@ bool cmArchiveWrite::AddFile(const char* file, return false; } - // Content. - if(size_t size = static_cast(archive_entry_size(e))) + // do not copy content of symlink + if (!archive_entry_symlink(e)) { - return this->AddData(file, size); + // Content. + if(size_t size = static_cast(archive_entry_size(e))) + { + return this->AddData(file, size); + } } return true; }