From d78bdb27832c91c775ad3782c9eb436dcd6a1e7c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johan=20Bj=C3=B6rk?= Date: Sat, 27 Aug 2011 19:35:08 +0200 Subject: [PATCH] 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 --- Source/cmArchiveWrite.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Source/cmArchiveWrite.cxx b/Source/cmArchiveWrite.cxx index 25dc8ba48..eab8a592a 100644 --- a/Source/cmArchiveWrite.cxx +++ b/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; }