diff options
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; |