shell32: for FO_COPY, if the destination is an empty string, SHFileOperation should use the current directory.

Alexandre Julliard julliard at winehq.org
Thu May 21 05:46:55 CDT 2009


lionel_debroux at yahoo.fr writes:

> @@ -1179,6 +1181,15 @@ static HRESULT copy_files(FILE_OPERATION *op, const FILE_LIST *flFrom, FILE_LIST
>      const FILE_ENTRY *entryToCopy;
>      const FILE_ENTRY *fileDest = &flTo->feFiles[0];
>  
> +    /* If the destination is empty, SHFileOperation should use the current directory */
> +    if (!fileDest)
> +    {
> +        WCHAR currd[MAX_PATH];
> +        GetCurrentDirectoryW(MAX_PATH, currd);
> +        parse_file_list(flTo, currd);
> +        fileDest = &flTo->feFiles[0];
> +    }

This can't possibly work. parse_file_list requires a null-terminated
list, and you will be overwriting the previous data. This needs more
thought.

-- 
Alexandre Julliard
julliard at winehq.org



More information about the wine-devel mailing list