summaryrefslogtreecommitdiffstats
path: root/Source/cmSystemTools.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2002-11-20 17:58:29 (GMT)
committerBrad King <brad.king@kitware.com>2002-11-20 17:58:29 (GMT)
commitc96c3c382fce965f70d4ad8fc4881aa922c5a13f (patch)
tree0e784aa0c090b3215f82e79f28ac77f9d9235055 /Source/cmSystemTools.cxx
parent6435f608b975ce24a5f424c55d208b2e460c2c3b (diff)
downloadCMake-c96c3c382fce965f70d4ad8fc4881aa922c5a13f.zip
CMake-c96c3c382fce965f70d4ad8fc4881aa922c5a13f.tar.gz
CMake-c96c3c382fce965f70d4ad8fc4881aa922c5a13f.tar.bz2
BUG: Attempt to fix CopyFile problem using flush before check for success.
Diffstat (limited to 'Source/cmSystemTools.cxx')
-rw-r--r--Source/cmSystemTools.cxx7
1 files changed, 6 insertions, 1 deletions
diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx
index 3ea396c..81c4fa3 100644
--- a/Source/cmSystemTools.cxx
+++ b/Source/cmSystemTools.cxx
@@ -1246,7 +1246,12 @@ void cmSystemTools::cmCopyFile(const char* source,
fout.write(buffer, fin.gcount());
}
}
-
+
+ // Make sure the operating system has finished writing the file
+ // before closing it. This will ensure the file is finished before
+ // the check below.
+ fout.flush();
+
fin.close();
fout.close();