mirror of
https://github.com/Kitware/CMake.git
synced 2026-02-22 06:59:01 -06:00
BUG: CopyFile should return immediately after an error occurs.
This commit is contained in:
@@ -770,6 +770,7 @@ void cmSystemTools::cmCopyFile(const char* source,
|
||||
{
|
||||
cmSystemTools::Error("CopyFile failed to open input file \"",
|
||||
source, "\"");
|
||||
return;
|
||||
}
|
||||
std::ofstream fout(destination,
|
||||
#ifdef _WIN32
|
||||
@@ -780,6 +781,7 @@ void cmSystemTools::cmCopyFile(const char* source,
|
||||
{
|
||||
cmSystemTools::Error("CopyFile failed to open output file \"",
|
||||
destination, "\"");
|
||||
return;
|
||||
}
|
||||
while(fin.getline(buffer, buffer_length, '\n') || fin.gcount())
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user