Browse Source

Bugfix

pull/50/head 0.3.1
Xadhoom 7 years ago
parent
commit
c5dfbee9b7
  1. 1
      SourceX/miniwin/misc_io.cpp

1
SourceX/miniwin/misc_io.cpp

@ -138,6 +138,7 @@ WINBOOL CloseHandle(HANDLE hObject)
filestream.write(file->buf.data(), file->buf.size());
if (filestream.fail())
throw std::runtime_error("ofstream::write");
filestream.close();
std::remove(file->path.c_str());
if (std::rename((file->path + ".tmp").c_str(), file->path.c_str()))
throw std::runtime_error("rename");

Loading…
Cancel
Save