mirror of
https://github.com/Kitware/CMake.git
synced 2026-03-15 22:35:33 -05:00
KWSys SystemTools: Update CopyFileAlways stream library workarounds
On some stream libraries failbit is not set when trying to read past EOF. Instead, always exit the copy loop when gcount() is zero.
This commit is contained in:
@@ -2330,6 +2330,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
|
||||
|
||||
Reference in New Issue
Block a user