diff options
author | Daniel Wilhelm <daniel@wili.li> | 2014-04-18 17:20:07 +0200 |
---|---|---|
committer | Daniel Wilhelm <daniel@wili.li> | 2014-04-18 17:20:07 +0200 |
commit | 88a8b528e20013c0aa3cc6bcd9659b0b5ddd9170 (patch) | |
tree | c6c5babb49b90293380106b81ae5c446959ac70f /zen/symlink_target.h | |
parent | 5.3 (diff) | |
download | FreeFileSync-88a8b528e20013c0aa3cc6bcd9659b0b5ddd9170.tar.gz FreeFileSync-88a8b528e20013c0aa3cc6bcd9659b0b5ddd9170.tar.bz2 FreeFileSync-88a8b528e20013c0aa3cc6bcd9659b0b5ddd9170.zip |
5.4
Diffstat (limited to 'zen/symlink_target.h')
-rw-r--r-- | zen/symlink_target.h | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/zen/symlink_target.h b/zen/symlink_target.h index 06239b5a..dfd5ebfa 100644 --- a/zen/symlink_target.h +++ b/zen/symlink_target.h @@ -64,16 +64,15 @@ Zstring getSymlinkRawTargetString(const Zstring& linkPath) //throw FileError #ifdef FFS_WIN //FSCTL_GET_REPARSE_POINT: http://msdn.microsoft.com/en-us/library/aa364571(VS.85).aspx - try //reading certain symlinks/junctions requires admin rights! This shall not cause an error in user mode! - { - activatePrivilege(SE_BACKUP_NAME); //throw FileError - } - catch (FileError&) {} + //reading certain symlinks/junctions requires admin rights! + try + { activatePrivilege(SE_BACKUP_NAME); } //throw FileError + catch (FileError&) {} //This shall not cause an error in user mode! const HANDLE hLink = ::CreateFile(applyLongPathPrefix(linkPath).c_str(), GENERIC_READ, FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE, - 0, + nullptr, OPEN_EXISTING, FILE_FLAG_BACKUP_SEMANTICS | FILE_FLAG_OPEN_REPARSE_POINT, nullptr); |