Browse Source

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 years ago
parent
commit
d78bdb2783
1 changed files with 2 additions and 1 deletions
  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;
     }