summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Cole <david.cole@kitware.com>2012-01-17 21:23:38 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2012-01-17 21:23:38 (GMT)
commita6bc62c5acd1093b11ddd51e65b8725bf226c1a7 (patch)
tree08b0824a5393ae9c6c2495b850ed81d42cd76730
parentf1f66c95ad9b35e74547a9c3af1e7315eb0b738b (diff)
parent768cf9183174e11c36c431d80e95ced2f5f9d2ad (diff)
downloadCMake-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.
-rw-r--r--Source/cmArchiveWrite.cxx10
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;
}