[RFA]: patch to 'rename', was Re: Wierd patch problem + simple fix
Chris Faylor
cgf@cygnus.com
Mon May 22 07:57:00 GMT 2000
On Mon, May 22, 2000 at 11:35:54AM +0200, Corinna Vinschen wrote:
>Chris Faylor wrote:
>>
>> On Sun, May 21, 2000 at 02:57:25PM +0200, Corinna Vinschen wrote:
>> >I'm completely unable to reproduce that problem...
>> >
>> >...as far as the $TMP directory is on the same drive
>> > as the patched file!
>> >[...]
>> But I really can't believe that this is a generic patch bug.
>> /tmp is often located on a different partition than a 'src'
>> directory and it is hard to believe that this could be broken
>> in patch.
>>
>> Is it possible that some stat (st_dev maybe?) field has changed
>> recently?
>
>I have investigated that phenomenon and I found that
>`MoveFile' returns ERROR_FILE_EXISTS while our `rename'
>code checks only for ERROR_ALREADY_EXISTS. Perhaps the return
>code is OS dependent? I'm testing mainly on W2K.
Or this got dropped when I recently rewrote that function. Please
check in the patch. It looks good.
cgf
>ChangeLog:
>==========
>
> * syscalls.cc (_rename): Additionally check for ERROR_FILE_EXISTS
> if MoveFile fails.
More information about the Cygwin-patches
mailing list