mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-04 05:51:27 +12:00
Add fs::file::set_delete
This commit is contained in:
parent
a54d9c527f
commit
0736fc8b28
3 changed files with 16 additions and 6 deletions
|
@ -387,9 +387,7 @@ logs::file_writer::file_writer(const std::string& name)
|
|||
|
||||
#ifdef _WIN32
|
||||
// Autodelete compressed log file
|
||||
FILE_DISPOSITION_INFO disp;
|
||||
disp.DeleteFileW = TRUE;
|
||||
SetFileInformationByHandle(m_fout2.get_handle(), FileDispositionInfo, &disp, sizeof(disp));
|
||||
m_fout2.set_delete();
|
||||
#endif
|
||||
}
|
||||
catch (const std::exception& e)
|
||||
|
@ -469,9 +467,7 @@ logs::file_writer::~file_writer()
|
|||
|
||||
#ifdef _WIN32
|
||||
// Cancel compressed log file autodeletion
|
||||
FILE_DISPOSITION_INFO disp;
|
||||
disp.DeleteFileW = FALSE;
|
||||
SetFileInformationByHandle(m_fout2.get_handle(), FileDispositionInfo, &disp, sizeof(disp));
|
||||
m_fout2.set_delete(false);
|
||||
|
||||
UnmapViewOfFile(m_fptr);
|
||||
CloseHandle(m_fmap);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue