[PATCH v2 2/4] server: Allow renaming a file to the same name.

Alexandre Julliard julliard at winehq.org
Tue Mar 10 15:49:41 CDT 2020


Zebediah Figura <z.figura12 at gmail.com> writes:

> @@ -2367,6 +2367,13 @@ static void set_fd_name( struct fd *fd, struct fd *root, const char *nameptr,
>  
>      if (!stat( name, &st ))
>      {
> +        if (fd->unix_fd != 1 && !fstat( fd->unix_fd, &st2 ) &&
> +            st.st_ino == st2.st_ino && st.st_dev == st2.st_dev)
> +        {
> +            free( name );
> +            return;
> +        }

Is this supposed to apply also to the create_link case?  This would need
a test. Also you lost a minus sign in there.

-- 
Alexandre Julliard
julliard at winehq.org



More information about the wine-devel mailing list