diff options
author | David Cole <david.cole@kitware.com> | 2012-01-17 21:23:38 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2012-01-17 21:23:38 (GMT) |
commit | a6bc62c5acd1093b11ddd51e65b8725bf226c1a7 (patch) | |
tree | 08b0824a5393ae9c6c2495b850ed81d42cd76730 /Source | |
parent | f1f66c95ad9b35e74547a9c3af1e7315eb0b738b (diff) | |
parent | 768cf9183174e11c36c431d80e95ced2f5f9d2ad (diff) | |
download | CMake-a6bc62c5acd1093b11ddd51e65b8725bf226c1a7.zip CMake-a6bc62c5acd1093b11ddd51e65b8725bf226c1a7.tar.gz CMake-a6bc62c5acd1093b11ddd51e65b8725bf226c1a7.tar.bz2 |
Merge topic 'fixSymlinkInZIP'
768cf91 Do not add the content of a file if it's a symlink.
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmArchiveWrite.cxx | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/Source/cmArchiveWrite.cxx b/Source/cmArchiveWrite.cxx index eab8a59..dc6b749 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<size_t>(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<size_t>(archive_entry_size(e))) + { + return this->AddData(file, size); + } } return true; } |