summaryrefslogtreecommitdiffstats
path: root/Source/cmSystemTools.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2001-09-21 13:40:07 (GMT)
committerBrad King <brad.king@kitware.com>2001-09-21 13:40:07 (GMT)
commit0f5f884a45ffd7f7465fb8836f1f6ac265cc2d5c (patch)
tree90a874fd2f5cca4dcf4fda9fef08c6cfce6a4819 /Source/cmSystemTools.cxx
parent7f5c61a570bbfe2dde673e61ad43ca1d2ed5d1e7 (diff)
downloadCMake-0f5f884a45ffd7f7465fb8836f1f6ac265cc2d5c.zip
CMake-0f5f884a45ffd7f7465fb8836f1f6ac265cc2d5c.tar.gz
CMake-0f5f884a45ffd7f7465fb8836f1f6ac265cc2d5c.tar.bz2
BUG: CopyFile should return immediately after an error occurs.
Diffstat (limited to 'Source/cmSystemTools.cxx')
-rw-r--r--Source/cmSystemTools.cxx2
1 files changed, 2 insertions, 0 deletions
diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx
index f8e1874..c00f9d6 100644
--- a/Source/cmSystemTools.cxx
+++ b/Source/cmSystemTools.cxx
@@ -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())
{