diff --git a/SystemTools.cxx b/SystemTools.cxx index bf6f458e1..8a481d654 100644 --- a/SystemTools.cxx +++ b/SystemTools.cxx @@ -2375,6 +2375,10 @@ bool SystemTools::CopyFileAlways(const kwsys_stl::string& source, const kwsys_st { fout.write(buffer, fin.gcount()); } + else + { + break; + } } // Make sure the operating system has finished writing the file