Commit 573713fa authored by Sebastian Lipponer's avatar Sebastian Lipponer Committed by Brad King
Browse files

SystemTools: CopyFileIfDifferent: Ensure that source is a file

parent 329d8c7c
......@@ -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