[PATCH 1/3] [cmd] move issues when overwriting files
Alexandre Julliard
julliard at winehq.org
Thu Sep 6 11:50:11 CDT 2012
Ann and Jason Edmeades <jason at edmeades.me.uk> writes:
> @@ -1709,8 +1709,13 @@ void WCMD_move (void)
> WINE_TRACE("Source '%s'\n", wine_dbgstr_w(src));
> WINE_TRACE("Dest '%s'\n", wine_dbgstr_w(dest));
>
> - /* If destination exists, prompt unless /Y supplied */
> - if (GetFileAttributesW(dest) != INVALID_FILE_ATTRIBUTES) {
> + /* If we have src == dest, skip moving this one */
> + if (strcmpW(src,dest)==0) ok = FALSE;
You can't detect identical files by comparing file names.
--
Alexandre Julliard
julliard at winehq.org
More information about the wine-devel
mailing list