summaryrefslogtreecommitdiffstats
path: root/Source/cmSystemTools.cxx
diff options
context:
space:
mode:
authorDomen Vrankar <domen.vrankar@gmail.com>2015-09-24 23:23:35 (GMT)
committerDomen Vrankar <domen.vrankar@gmail.com>2015-09-28 23:18:10 (GMT)
commit19c6f4eefce4f58538dd750af5d014bba23192f3 (patch)
tree46ef84fc386259b8dd1eacd68490fc55ec8ad001 /Source/cmSystemTools.cxx
parent749a140a0c635dca69e03245bfd6e0f2f4f43753 (diff)
downloadCMake-19c6f4eefce4f58538dd750af5d014bba23192f3.zip
CMake-19c6f4eefce4f58538dd750af5d014bba23192f3.tar.gz
CMake-19c6f4eefce4f58538dd750af5d014bba23192f3.tar.bz2
SystemTools: set time file permissions
On Windows if file permissions are read only FILE_WRITE_ATTRIBUTES will enables us to get file handle and change file time.
Diffstat (limited to 'Source/cmSystemTools.cxx')
-rw-r--r--Source/cmSystemTools.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx
index 2675066..fa84478 100644
--- a/Source/cmSystemTools.cxx
+++ b/Source/cmSystemTools.cxx
@@ -2048,7 +2048,7 @@ bool cmSystemTools::CopyFileTime(const char* fromFile, const char* toFile)
OPEN_EXISTING, 0, 0);
cmSystemToolsWindowsHandle hTo =
CreateFileW(SystemTools::ConvertToWindowsExtendedPath(toFile).c_str(),
- GENERIC_WRITE, 0, 0, OPEN_EXISTING, 0, 0);
+ FILE_WRITE_ATTRIBUTES, 0, 0, OPEN_EXISTING, 0, 0);
if(!hFrom || !hTo)
{
return false;
@@ -2127,7 +2127,7 @@ 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, 0, 0);
if(!h)
{
return false;