Merge topic 'fix-12284-cpack-symlinks'

7b8dcdd CPack: Do not recurse through directory symlinks (#12284)
d78bdb2 CMake: Write symlinks to directories as files in archives (#12284)
This commit is contained in:
David Cole 2011-09-07 15:39:03 -04:00 committed by CMake Topic Stage
commit 1a5c99581e
2 changed files with 3 additions and 1 deletions

View File

@ -1000,6 +1000,7 @@ int cmCPackGenerator::DoPackage()
std::string findExpr = tempDirectory;
findExpr += "/*";
gl.RecurseOn();
gl.SetRecurseThroughSymlinks(false);
if ( !gl.FindFiles(findExpr) )
{
cmCPackLogger(cmCPackLog::LOG_ERROR,

View File

@ -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;
}