diff options
| author | Stefan Boberg <[email protected]> | 2022-05-20 12:42:56 +0200 |
|---|---|---|
| committer | Stefan Boberg <[email protected]> | 2022-05-20 12:42:56 +0200 |
| commit | 5b271be0169b842cdc3d576e48bf0ddc2f122852 (patch) | |
| tree | 16f501d2190f19a7281ce3f30365817464e146cb /zenstore/basicfile.cpp | |
| parent | Added ZEN_USE_CATCH2 define (diff) | |
| parent | fix mac compilation error (diff) | |
| download | zen-5b271be0169b842cdc3d576e48bf0ddc2f122852.tar.xz zen-5b271be0169b842cdc3d576e48bf0ddc2f122852.zip | |
Merge branch 'main' into use-catch2
Diffstat (limited to 'zenstore/basicfile.cpp')
| -rw-r--r-- | zenstore/basicfile.cpp | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/zenstore/basicfile.cpp b/zenstore/basicfile.cpp index 8eb172a1c..e5a2adc41 100644 --- a/zenstore/basicfile.cpp +++ b/zenstore/basicfile.cpp @@ -373,31 +373,6 @@ BasicFile::SetFileSize(uint64_t FileSize) #endif } -void -BasicFile::MarkAsDeleteOnClose(std::error_code& Ec) -{ - Ec.clear(); -#if ZEN_PLATFORM_WINDOWS - FILE_DISPOSITION_INFO Fdi{}; - Fdi.DeleteFile = TRUE; - BOOL Success = SetFileInformationByHandle(m_FileHandle, FileDispositionInfo, &Fdi, sizeof Fdi); - if (!Success) - { - Ec = MakeErrorCodeFromLastError(); - } -#elif ZEN_PLATFORM_LINUX || ZEN_PLATFORM_MAC - std::filesystem::path SourcePath = PathFromHandle(m_FileHandle); - if (unlink(SourcePath.c_str()) < 0) - { - int UnlinkError = zen::GetLastError(); - if (UnlinkError != ENOENT) - { - Ec = MakeErrorCode(UnlinkError); - } - } -#endif -} - void* BasicFile::Detach() { |