BUG: CopyFile should return immediately after an error occurs.
This commit is contained in:
parent
7f5c61a570
commit
0f5f884a45
|
@ -770,6 +770,7 @@ void cmSystemTools::cmCopyFile(const char* source,
|
||||||
{
|
{
|
||||||
cmSystemTools::Error("CopyFile failed to open input file \"",
|
cmSystemTools::Error("CopyFile failed to open input file \"",
|
||||||
source, "\"");
|
source, "\"");
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
std::ofstream fout(destination,
|
std::ofstream fout(destination,
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
|
@ -780,6 +781,7 @@ void cmSystemTools::cmCopyFile(const char* source,
|
||||||
{
|
{
|
||||||
cmSystemTools::Error("CopyFile failed to open output file \"",
|
cmSystemTools::Error("CopyFile failed to open output file \"",
|
||||||
destination, "\"");
|
destination, "\"");
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
while(fin.getline(buffer, buffer_length, '\n') || fin.gcount())
|
while(fin.getline(buffer, buffer_length, '\n') || fin.gcount())
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue