|
Notes |
|
|
(0020908)
|
|
Andras Lasso 2
|
|
2010-06-03 09:49
|
|
|
Replacing the current file stream creation/read/write/close in SystemTools::CopyFileAlways with a simple Windows API call (CopyFile(source,destination,false)) seems to work very well. The copy is successful in all cases, build and package generation is completed without errors. |
|
|
|
(0020913)
|
|
Brad King
|
|
2010-06-03 11:40
|
|
According to
http://msdn.microsoft.com/en-us/library/aa363851(VS.85).aspx [^]
the CopyFile API call requires Windows 2000. We used to support Windows 98 but no longer need to do so.
However, the CopyFile function preserves the file modification time of the source file. This is desirable in some cases but is a change in behavior. A lot of code assumes (knows) that CopyFileAlways creates a new file. Since CopyFile also preserves permissions we will not be able to retroactively update the modification time for read-only files.
The stat-after-copy was introduced a long time ago:
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=36189ce2 [^]
but the "more paranoid checking" message is not very informative as to why. I would think that if the return code of the file write was okay then we can trust that it worked. Perhaps the stat can just be removed.
|
|
|
|
(0020916)
|
|
Brad King
|
|
2010-06-03 12:53
|
|
|
|
|
(0020920)
|
|
Andras Lasso 2
|
|
2010-06-03 17:43
|
|
I've tried a full Slicer build and package generation with the removed stat and it worked well! There were no copy errors any more!
When do you think this fix will be available in an official release? |
|
|
|
(0020924)
|
|
Brad King
|
|
2010-06-04 09:07
|
|
|
It will be in 2.8.2; not sure when it will be out. |
|
|
|
(0023060)
|
|
Brad King
|
|
2010-11-08 11:16
|
|
2.8.2 was released and contains this fix.
2.8.3 has since been released and still contains it. |
|