summaryrefslogtreecommitdiff
path: root/zen/file_access.cpp
diff options
context:
space:
mode:
authorDaniel Wilhelm <daniel@wili.li>2016-05-31 16:38:45 +0200
committerDaniel Wilhelm <daniel@wili.li>2016-05-31 16:38:45 +0200
commitbe08c6c09a3026da628daf2425516beda1557bb3 (patch)
tree062cc2f6a1e5ba5a2fdcb53549cc09c4ff5d062a /zen/file_access.cpp
parent8.1 (diff)
downloadFreeFileSync-be08c6c09a3026da628daf2425516beda1557bb3.tar.gz
FreeFileSync-be08c6c09a3026da628daf2425516beda1557bb3.tar.bz2
FreeFileSync-be08c6c09a3026da628daf2425516beda1557bb3.zip
8.2
Diffstat (limited to 'zen/file_access.cpp')
-rw-r--r--zen/file_access.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/zen/file_access.cpp b/zen/file_access.cpp
index 78da0220..11f61291 100644
--- a/zen/file_access.cpp
+++ b/zen/file_access.cpp
@@ -1199,7 +1199,7 @@ void copyItemPermissions(const Zstring& sourcePath, const Zstring& targetPath, P
//Note: trying to copy SACL (SACL_SECURITY_INFORMATION) may return ERROR_PRIVILEGE_NOT_HELD (1314) on Samba shares. This is not due to missing privileges!
//However, this is okay, since copying NTFS permissions doesn't make sense in this case anyway
- //the following privilege may be required according to http://msdn.microsoft.com/en-us/library/aa364399(VS.85).aspx (although not needed nor active in my tests)
+ //the following privilege may be required according to https://msdn.microsoft.com/en-us/library/aa364399 (although not needed nor active in my tests)
activatePrivilege(SE_BACKUP_NAME); //throw FileError
//enable privilege: required to copy owner information
@@ -1259,14 +1259,14 @@ void copyItemPermissions(const Zstring& sourcePath, const Zstring& targetPath, P
PACL dacl = nullptr;
PACL sacl = nullptr;
- //File Security and Access Rights: http://msdn.microsoft.com/en-us/library/aa364399(v=VS.85).aspx
- //SECURITY_INFORMATION Access Rights: http://msdn.microsoft.com/en-us/library/windows/desktop/aa379573(v=vs.85).aspx
+ //File Security and Access Rights: https://msdn.microsoft.com/en-us/library/aa364399
+ //SECURITY_INFORMATION Access Rights: https://msdn.microsoft.com/en-us/library/windows/desktop/aa379573
const HANDLE hSource = ::CreateFile(applyLongPathPrefix(source).c_str(),
READ_CONTROL | ACCESS_SYSTEM_SECURITY, //ACCESS_SYSTEM_SECURITY required for SACL access
FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE,
nullptr,
OPEN_EXISTING,
- FILE_FLAG_BACKUP_SEMANTICS | (procSl == SYMLINK_DIRECT ? FILE_FLAG_OPEN_REPARSE_POINT : 0), //FILE_FLAG_BACKUP_SEMANTICS needed to open a directory
+ FILE_FLAG_BACKUP_SEMANTICS | (procSl == SymLinkHandling::DIRECT ? FILE_FLAG_OPEN_REPARSE_POINT : 0), //FILE_FLAG_BACKUP_SEMANTICS needed to open a directory
nullptr);
if (hSource == INVALID_HANDLE_VALUE)
throw FileError
@@ -1303,7 +1303,7 @@ void copyItemPermissions(const Zstring& sourcePath, const Zstring& targetPath, P
FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE, // dwShareMode
nullptr, // lpSecurityAttributes
OPEN_EXISTING, // dwCreationDisposition
- FILE_FLAG_BACKUP_SEMANTICS | (procSl == SYMLINK_DIRECT ? FILE_FLAG_OPEN_REPARSE_POINT : 0), // dwFlagsAndAttributes
+ FILE_FLAG_BACKUP_SEMANTICS | (procSl == SymLinkHandling::DIRECT ? FILE_FLAG_OPEN_REPARSE_POINT : 0), // dwFlagsAndAttributes
nullptr); // hTemplateFile
});
@@ -2177,7 +2177,7 @@ InSyncAttributes copyFileWindowsDefault(const Zstring& sourceFile, //throw FileE
//encrypted destination is not supported with Windows 2000! -> whatever
copyFlags |= COPY_FILE_ALLOW_DECRYPTED_DESTINATION; //allow copying from encrypted to non-encrypted location
- //if (vistaOrLater()) //see http://blogs.technet.com/b/askperf/archive/2007/05/08/slow-large-file-copy-issues.aspx
+ //if (vistaOrLater()) //see https://blogs.technet.microsoft.com/askperf/2007/05/08/slow-large-file-copy-issues/
// copyFlags |= COPY_FILE_NO_BUFFERING; //no perf difference at worst, improvement for large files (20% in test NTFS -> NTFS)
// - this flag may cause file corruption! http://www.freefilesync.org/forum/viewtopic.php?t=1857
// - documentation on CopyFile2() even states: "It is not recommended to pause copies that are using this flag."
bgstack15