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
This commit is contained in:
Johan Björk 2011-08-27 19:35:08 +02:00 committed by David Cole
parent 527a40f06f
commit d78bdb2783
1 changed files with 2 additions and 1 deletions

View File

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