diff options
author | Brad King <brad.king@kitware.com> | 2002-11-20 17:58:29 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2002-11-20 17:58:29 (GMT) |
commit | c96c3c382fce965f70d4ad8fc4881aa922c5a13f (patch) | |
tree | 0e784aa0c090b3215f82e79f28ac77f9d9235055 /Source/cmSystemTools.cxx | |
parent | 6435f608b975ce24a5f424c55d208b2e460c2c3b (diff) | |
download | CMake-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.cxx | 7 |
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(); |