Explorar o código

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 %!s(int64=14) %!d(string=hai) anos
pai
achega
d78bdb2783
Modificáronse 1 ficheiros con 2 adicións e 1 borrados
  1. 2 1
      Source/cmArchiveWrite.cxx

+ 2 - 1
Source/cmArchiveWrite.cxx

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