浏览代码

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
Johan Björk 14 年之前
父节点
当前提交
d78bdb2783
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2 1
      Source/cmArchiveWrite.cxx

+ 2 - 1
Source/cmArchiveWrite.cxx

@@ -180,7 +180,8 @@ bool cmArchiveWrite::AddPath(const char* path,
     {
     {
     return false;
     return false;
     }
     }
-  if(!cmSystemTools::FileIsDirectory(path))
+  if(!cmSystemTools::FileIsDirectory(path) ||
+    cmSystemTools::FileIsSymlink(path))
     {
     {
     return true;
     return true;
     }
     }