summaryrefslogtreecommitdiffstats
path: root/Source/cmSystemTools.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2015-09-29 14:08:06 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2015-09-29 14:08:06 (GMT)
commit6a072563d2c81f653986318882f9782469a58936 (patch)
tree66b89387d38af1af25bcd5f346c5152f58395f16 /Source/cmSystemTools.cxx
parentddd082fb1fc4a771e84162bd9ef2553ef44bad7c (diff)
parent9298f56dcedb888ff140b6b1aab90be91162d50f (diff)
downloadCMake-6a072563d2c81f653986318882f9782469a58936.zip
CMake-6a072563d2c81f653986318882f9782469a58936.tar.gz
CMake-6a072563d2c81f653986318882f9782469a58936.tar.bz2
Merge topic 'cpack-package-empty-dirs'
9298f56d CPack: allow packaging of empty directories ecd71c9c SystemTools: time operations on directories 19c6f4ee SystemTools: set time file permissions 749a140a CPackDeb: allow empty directories in component packages
Diffstat (limited to 'Source/cmSystemTools.cxx')
-rw-r--r--Source/cmSystemTools.cxx11
1 files changed, 7 insertions, 4 deletions
diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx
index 2675066..d3c1f16 100644
--- a/Source/cmSystemTools.cxx
+++ b/Source/cmSystemTools.cxx
@@ -2045,10 +2045,11 @@ bool cmSystemTools::CopyFileTime(const char* fromFile, const char* toFile)
cmSystemToolsWindowsHandle hFrom =
CreateFileW(SystemTools::ConvertToWindowsExtendedPath(fromFile).c_str(),
GENERIC_READ, FILE_SHARE_READ, 0,
- OPEN_EXISTING, 0, 0);
+ OPEN_EXISTING, FILE_FLAG_BACKUP_SEMANTICS, 0);
cmSystemToolsWindowsHandle hTo =
CreateFileW(SystemTools::ConvertToWindowsExtendedPath(toFile).c_str(),
- GENERIC_WRITE, 0, 0, OPEN_EXISTING, 0, 0);
+ FILE_WRITE_ATTRIBUTES, 0, 0, OPEN_EXISTING,
+ FILE_FLAG_BACKUP_SEMANTICS, 0);
if(!hFrom || !hTo)
{
return false;
@@ -2100,7 +2101,8 @@ bool cmSystemTools::FileTimeGet(const char* fname, cmSystemToolsFileTime* t)
#if defined(_WIN32) && !defined(__CYGWIN__)
cmSystemToolsWindowsHandle h =
CreateFileW(SystemTools::ConvertToWindowsExtendedPath(fname).c_str(),
- GENERIC_READ, FILE_SHARE_READ, 0, OPEN_EXISTING, 0, 0);
+ GENERIC_READ, FILE_SHARE_READ, 0, OPEN_EXISTING,
+ FILE_FLAG_BACKUP_SEMANTICS, 0);
if(!h)
{
return false;
@@ -2127,7 +2129,8 @@ bool cmSystemTools::FileTimeSet(const char* fname, cmSystemToolsFileTime* t)
#if defined(_WIN32) && !defined(__CYGWIN__)
cmSystemToolsWindowsHandle h =
CreateFileW(SystemTools::ConvertToWindowsExtendedPath(fname).c_str(),
- GENERIC_WRITE, 0, 0, OPEN_EXISTING, 0, 0);
+ FILE_WRITE_ATTRIBUTES, 0, 0, OPEN_EXISTING,
+ FILE_FLAG_BACKUP_SEMANTICS, 0);
if(!h)
{
return false;