@Nandurius said:
@tolstick said:Guess what is it supposed to do? :)Well, instead of removing read-only status, it just toggles it, making the copying quite difficult :-)
FileAttribs &= ^ FILE_ATTRIBUTE_READONLY; ??
Sure!
But one interesting thing is that this code works fine while the source file is RO, and even one more time when the source file is RW, and only after that it fails to copy the new version of file :)