Skip to content
This repository has been archived by the owner on May 12, 2024. It is now read-only.

Commit

Permalink
Delete temporary file on close
Browse files Browse the repository at this point in the history
  • Loading branch information
wangqr committed Jul 20, 2020
1 parent 9b8c5cc commit 3415734
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions libaegisub/common/file_mapping.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,10 @@ file_mapping::file_mapping(fs::path const& filename, bool temporary)
#ifdef _WIN32
: handle(CreateFileW(filename.wstring().c_str(),
temporary ? read_write : read_only,
temporary ? FILE_SHARE_READ | FILE_SHARE_WRITE : FILE_SHARE_READ,
temporary ? FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE : FILE_SHARE_READ,
nullptr,
temporary ? OPEN_ALWAYS : OPEN_EXISTING,
0, 0))
temporary ? FILE_ATTRIBUTE_TEMPORARY | FILE_FLAG_DELETE_ON_CLOSE : 0, 0))
{
if (handle == ipcdetail::invalid_file()) {
switch (GetLastError()) {
Expand Down

0 comments on commit 3415734

Please sign in to comment.