瀏覽代碼

Merge topic 'cpack-symlinks'

bcc5cd44ed CPack: Do not recurse through directory symlinks

Acked-by: Kitware Robot <[email protected]>
Merge-request: !4637
Brad King 5 年之前
父節點
當前提交
fb5d24fa3c
共有 2 個文件被更改,包括 5 次插入0 次删除
  1. 3 0
      Source/CPack/cmCPackDebGenerator.cxx
  2. 2 0
      Source/CPack/cmCPackGenerator.cxx

+ 3 - 0
Source/CPack/cmCPackDebGenerator.cxx

@@ -487,6 +487,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"
@@ -511,6 +512,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"
@@ -630,6 +632,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"

+ 2 - 0
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());