Hi guys,

Here's a fix for the bug [ 569102 ]; to reproduce try to copy (overwrite) to a file with read-only attribute.
I checked with Ant, it ignores this attribute and so I did.

Insert code in file CopyTask.cs, method CopyTask.DoFileOperations, line 128, before File.Copy(sourcePath, dstPath, true); :

// code
FileAttributes fileAttributes = File.GetAttributes (dstPath);
fileAttributes &= ~FileAttributes.ReadOnly;
File.SetAttributes(dstPath, fileAttributes);
// end of code

Did not checked, but I assume that an exception is thrown if target file has System attribute.
I'll check it.
------------------------------------------------------- This sf.net email is sponsored by: Jabber - The world's fastest growing real-time communications platform! Don't just IM. Build it in! http://www.jabber.com/osdn/xim _______________________________________________ Nant-developers mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/nant-developers

Reply via email to