Commit bcc5cd44 authored by Brad King's avatar Brad King
Browse files

CPack: Do not recurse through directory symlinks

Extend the fix from commit 7b8dcdd1 (CPack: Do not recurse through
directory symlinks (#12284), 2011-08-27, v2.8.6~55^2) to more places in
CPack.

Issue: #12284
parent bd580b7d
Pipeline #169765 passed with stage
......@@ -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"
......
......@@ -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());
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment