[fpc-devel] cp.exe (GNU fileutils for Windows)

Bogusław Brandys brandys at o2.pl
Fri Mar 3 20:37:51 CET 2006


There were previously problems with cp.exe from Mingw port of GNU 
fileutils and some read only directories mostly from .svn.
Those problems force additional step (SVN export) during FPC build under 
Windows which is really annoying ,time expensive and not needed.

To avoid this step I've fixed cp.exe in two ways:

- before opening/creating/deleting destination files it now tries to 
re-set file attributes (using WinApi SetFileAttributes) so read-only 
attribute should be no problem

- it does not exit with error when cannot set datetime attribute of 
read-only folders (especially with . in name)
Error is reported but program do not exit
I think it is also consistent with cp.exe --preserve option description 
which clearly states that it preserve attributes *if possible*

Binary and sources (also for other fileutils) based on Mingw 4.0 
fileutils sources are temporary here:


Please ,download it and test.I've tested it on my Windows XP and works 
good, but more tests are required especially on Win9X (I don't even know 
if it work on Win9X)
URL's will be available during next few days.

Best Regards
Boguslaw Brandys

More information about the fpc-devel mailing list