Commit e382d8fb authored by Brad King's avatar Brad King Committed by Kitware Robot
Browse files

Merge topic 'SystemTools-CopyFileIfDifferent-no-dir'


 SystemTools: CopyFileIfDifferent: Ensure that source is a file
Acked-by: Kitware Robot's avatarKitware Robot <>
Merge-request: !163
parents 329d8c7c 573713fa
......@@ -2182,6 +2182,10 @@ static std::string FileInDir(const std::string& source, const std::string& dir)
bool SystemTools::CopyFileIfDifferent(const std::string& source,
const std::string& destination)
if (SystemTools::FileIsDirectory(source)) {
return false;
// special check for a destination that is a directory
// FilesDiffer does not handle file to directory compare
if (SystemTools::FileIsDirectory(destination)) {
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment