summaryrefslogtreecommitdiff
path: root/zen/file_update_handle.h
diff options
context:
space:
mode:
Diffstat (limited to 'zen/file_update_handle.h')
-rw-r--r--zen/file_update_handle.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/zen/file_update_handle.h b/zen/file_update_handle.h
index aa9edebd..716048fd 100644
--- a/zen/file_update_handle.h
+++ b/zen/file_update_handle.h
@@ -24,7 +24,7 @@ public:
const DWORD lastError = ::GetLastError();
if (lastError == ERROR_ACCESS_DENIED) //function fails if file is read-only
{
- zen::ScopeGuard guardErrorCode = zen::makeGuard([&]() { ::SetLastError(lastError); }); //transactional behavior: ensure cleanup (e.g. network drop) -> cref [!]
+ //zen::ScopeGuard guardErrorCode = zen::makeGuard([&] { ::SetLastError(lastError); }); //transactional behavior: ensure cleanup (e.g. network drop) -> cref [!]
//read-only file attribute may cause trouble: temporarily reset it
const DWORD tmpAttr = ::GetFileAttributes(filenameFmt.c_str());
@@ -32,7 +32,7 @@ public:
{
if (::SetFileAttributes(filenameFmt.c_str(), FILE_ATTRIBUTE_NORMAL))
{
- guardErrorCode.dismiss();
+ //guardErrorCode.dismiss();
attr = tmpAttr; //"create" guard on read-only attribute
//now try again
bgstack15