summaryrefslogtreecommitdiffstats
path: root/Modules/Dart.cmake
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2013-01-31 16:42:17 (GMT)
committerBrad King <brad.king@kitware.com>2013-02-04 20:15:21 (GMT)
commit59b568e5e8e294345c10789e1b3488391d5cd6f3 (patch)
treef8bf5724a2882e94168d6f0cbfbd9cabcfe1dbc6 /Modules/Dart.cmake
parent21fc6c46df7f2271d7baace04f239f031785b917 (diff)
downloadCMake-59b568e5e8e294345c10789e1b3488391d5cd6f3.zip
CMake-59b568e5e8e294345c10789e1b3488391d5cd6f3.tar.gz
CMake-59b568e5e8e294345c10789e1b3488391d5cd6f3.tar.bz2
Fix cmSystemTools::RenameFile race on Windows
Since commit d46d8df0 (Re-implemented cmGeneratedFileStream to look like a real stream and replace the destination file atomically, 2004-11-03) our RenameFile implementation tries to deal with MoveFile not replacing read-only files. In order to avoid the Get/SetFileAttributes pair we used stat to test for existence of the destination file. This has a race in which the destination could be created between the test for existence and the MoveFile call. Remove the stat call and use GetFileAttributes to detect whether the file exists. This shortens the race but does not eliminate it. Use a loop to try multiple times in case we lose the race. While at it, drop Win9x support and always use MoveFileEx.
Diffstat (limited to 'Modules/Dart.cmake')
0 files changed, 0 insertions, 0 deletions