diff options
author | Brad King <brad.king@kitware.com> | 2020-04-22 12:30:44 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2020-04-22 12:30:53 (GMT) |
commit | c4ccf23186bce46824655358c2786134a754e6f1 (patch) | |
tree | 471dbc23a9ccac26fdddf1a29a155d1b67fecc09 | |
parent | 4a5de69e09d83fa8151df43abb8e58ece2bb29de (diff) | |
parent | bcc5cd44ed083dbcc71692146e9d2aa3d5ba6e59 (diff) | |
download | CMake-c4ccf23186bce46824655358c2786134a754e6f1.zip CMake-c4ccf23186bce46824655358c2786134a754e6f1.tar.gz CMake-c4ccf23186bce46824655358c2786134a754e6f1.tar.bz2 |
Merge topic 'cpack-symlinks' into release-3.17
bcc5cd44ed CPack: Do not recurse through directory symlinks
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4637
-rw-r--r-- | Source/CPack/cmCPackDebGenerator.cxx | 3 | ||||
-rw-r--r-- | Source/CPack/cmCPackGenerator.cxx | 2 |
2 files changed, 5 insertions, 0 deletions
diff --git a/Source/CPack/cmCPackDebGenerator.cxx b/Source/CPack/cmCPackDebGenerator.cxx index 5b7d8fb..d92acde 100644 --- a/Source/CPack/cmCPackDebGenerator.cxx +++ b/Source/CPack/cmCPackDebGenerator.cxx @@ -484,6 +484,7 @@ int cmCPackDebGenerator::PackageOnePack(std::string const& initialTopLevel, findExpr += "/*"; gl.RecurseOn(); gl.SetRecurseListDirs(true); + gl.SetRecurseThroughSymlinks(false); if (!gl.FindFiles(findExpr)) { cmCPackLogger(cmCPackLog::LOG_ERROR, "Cannot find any files in the installed directory" @@ -508,6 +509,7 @@ int cmCPackDebGenerator::PackageOnePack(std::string const& initialTopLevel, findExpr += "/*"; gl.RecurseOn(); gl.SetRecurseListDirs(true); + gl.SetRecurseThroughSymlinks(false); if (!gl.FindFiles(findExpr)) { cmCPackLogger(cmCPackLog::LOG_ERROR, "Cannot find any files in the installed directory" @@ -627,6 +629,7 @@ int cmCPackDebGenerator::PackageComponentsAllInOne( findExpr += "/*"; gl.RecurseOn(); gl.SetRecurseListDirs(true); + gl.SetRecurseThroughSymlinks(false); if (!gl.FindFiles(findExpr)) { cmCPackLogger(cmCPackLog::LOG_ERROR, "Cannot find any files in the installed directory" diff --git a/Source/CPack/cmCPackGenerator.cxx b/Source/CPack/cmCPackGenerator.cxx index 712eb77..e053144 100644 --- a/Source/CPack/cmCPackGenerator.cxx +++ b/Source/CPack/cmCPackGenerator.cxx @@ -354,6 +354,7 @@ int cmCPackGenerator::InstallProjectViaInstalledDirectories( "- Install directory: " << top << std::endl); gl.RecurseOn(); gl.SetRecurseListDirs(true); + gl.SetRecurseThroughSymlinks(false); if (!gl.FindFiles(findExpr)) { cmCPackLogger(cmCPackLog::LOG_ERROR, "Cannot find any files in the installed directory" @@ -862,6 +863,7 @@ int cmCPackGenerator::InstallCMakeProject( findExpr += "/*"; glB.RecurseOn(); glB.SetRecurseListDirs(true); + glB.SetRecurseThroughSymlinks(false); glB.FindFiles(findExpr); filesBefore = glB.GetFiles(); std::sort(filesBefore.begin(), filesBefore.end()); |