diff options
author | Daniel Wilhelm <shieldwed@outlook.com> | 2016-10-29 11:34:19 +0200 |
---|---|---|
committer | Daniel Wilhelm <shieldwed@outlook.com> | 2016-10-29 11:34:19 +0200 |
commit | 8d66e8a2b8cfe4eef4b946a1ab64354dfd7da00b (patch) | |
tree | 48e94273d3ee6b9d755e0081c46d29a387871611 /zen/file_io.cpp | |
parent | 8.3 (diff) | |
download | FreeFileSync-8d66e8a2b8cfe4eef4b946a1ab64354dfd7da00b.tar.gz FreeFileSync-8d66e8a2b8cfe4eef4b946a1ab64354dfd7da00b.tar.bz2 FreeFileSync-8d66e8a2b8cfe4eef4b946a1ab64354dfd7da00b.zip |
8.4
Diffstat (limited to 'zen/file_io.cpp')
-rw-r--r-- | zen/file_io.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/zen/file_io.cpp b/zen/file_io.cpp index d0a1bfa3..6243980b 100644 --- a/zen/file_io.cpp +++ b/zen/file_io.cpp @@ -1,8 +1,8 @@ -// ************************************************************************** -// * This file is part of the FreeFileSync project. It is distributed under * -// * GNU General Public License: http://www.gnu.org/licenses/gpl-3.0 * -// * Copyright (C) Zenju (zenju AT gmx DOT de) - All Rights Reserved * -// ************************************************************************** +// ***************************************************************************** +// * This file is part of the FreeFileSync project. It is distributed under * +// * GNU General Public License: http://www.gnu.org/licenses/gpl-3.0 * +// * Copyright (C) Zenju (zenju AT freefilesync DOT org) - All Rights Reserved * +// ***************************************************************************** #include "file_io.h" #include "file_access.h" @@ -73,7 +73,7 @@ FileInput::FileInput(const Zstring& filepath) : //throw FileError, ErrorFileLock FileBase(filepath), fileHandle(getInvalidHandle()) { #ifdef ZEN_WIN - try { activatePrivilege(SE_BACKUP_NAME); } + try { activatePrivilege(PrivilegeName::BACKUP); } catch (const FileError&) {} auto createHandle = [&](DWORD dwShareMode) @@ -222,9 +222,9 @@ FileOutput::FileOutput(const Zstring& filepath, AccessFlag access) : //throw Fil FileBase(filepath), fileHandle(getInvalidHandle()) { #ifdef ZEN_WIN - try { activatePrivilege(SE_BACKUP_NAME); } + try { activatePrivilege(PrivilegeName::BACKUP); } catch (const FileError&) {} - try { activatePrivilege(SE_RESTORE_NAME); } + try { activatePrivilege(PrivilegeName::RESTORE); } catch (const FileError&) {} const DWORD dwCreationDisposition = access == FileOutput::ACC_OVERWRITE ? CREATE_ALWAYS : CREATE_NEW; |