diff options
author | Daniel Wilhelm <daniel@wili.li> | 2014-04-18 17:19:49 +0200 |
---|---|---|
committer | Daniel Wilhelm <daniel@wili.li> | 2014-04-18 17:19:49 +0200 |
commit | c8e0e909b4a8d18319fc65434a10dc446434817c (patch) | |
tree | eee91e7d2ce229dd043811eae8f1e2bd78061916 /zen/file_update_handle.h | |
parent | 5.2 (diff) | |
download | FreeFileSync-c8e0e909b4a8d18319fc65434a10dc446434817c.tar.gz FreeFileSync-c8e0e909b4a8d18319fc65434a10dc446434817c.tar.bz2 FreeFileSync-c8e0e909b4a8d18319fc65434a10dc446434817c.zip |
5.3
Diffstat (limited to 'zen/file_update_handle.h')
-rw-r--r-- | zen/file_update_handle.h | 4 |
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 |