summaryrefslogtreecommitdiffstats
path: root/Source/cmArchiveWrite.cxx
diff options
context:
space:
mode:
authorJohan Björk <phb@spotify.com>2011-08-27 17:35:08 (GMT)
committerDavid Cole <david.cole@kitware.com>2011-09-06 17:58:00 (GMT)
commitd78bdb27832c91c775ad3782c9eb436dcd6a1e7c (patch)
tree98e59a2e0de19c3c74829cb0d10327d2e925d29d /Source/cmArchiveWrite.cxx
parent527a40f06fc7f0ea6aa9c1fe96fb0fe5611fa633 (diff)
downloadCMake-d78bdb27832c91c775ad3782c9eb436dcd6a1e7c.zip
CMake-d78bdb27832c91c775ad3782c9eb436dcd6a1e7c.tar.gz
CMake-d78bdb27832c91c775ad3782c9eb436dcd6a1e7c.tar.bz2
CMake: Write symlinks to directories as files in archives (#12284)
Do not recurse through directory symlinks when adding files. Recursing through directory symlinks will generate broken archives, i.e., they will look something like this: foo -> bar/bar foo/Info <- Shouldn't be in archive. bar/bar bar/bar/Info
Diffstat (limited to 'Source/cmArchiveWrite.cxx')
-rw-r--r--Source/cmArchiveWrite.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/Source/cmArchiveWrite.cxx b/Source/cmArchiveWrite.cxx
index 25dc8ba..eab8a59 100644
--- a/Source/cmArchiveWrite.cxx
+++ b/Source/cmArchiveWrite.cxx
@@ -180,7 +180,8 @@ bool cmArchiveWrite::AddPath(const char* path,
{
return false;
}
- if(!cmSystemTools::FileIsDirectory(path))
+ if(!cmSystemTools::FileIsDirectory(path) ||
+ cmSystemTools::FileIsSymlink(path))
{
return true;
}