shell32: FOF_MULTIDESTFILES must be set when copying files into directory

Vitaly Perov vitperov at etersoft.ru
Sat Oct 18 05:48:40 CDT 2008


>We've been over this before.  This needs a test case.  Either way,
>this doesn't look right.  What are you trying to fix?

Some program call SHFileOperationW to move one folder to another without 
FOF_MULTIDESTFILES. The source folder contain subfolders, so SHFileOperationW 
is called recursively. To move subfolder function move_dir_to_dir is called. 
Now it pass parent lpFileOp to the new iteration of SHFileOperationW, so 
FOF_MULTIDESTFILES is no set (but it should be set, as we copy files to the 
folder). So in the function move_files the following condition is true:

if (!(lpFileOp->fFlags & FOF_MULTIDESTFILES) &&
        !flFrom->bAnyDirectories &&
        flFrom->dwNumFiles > flTo->dwNumFiles)
    {
        return ERROR_CANCELLED;
    }

and SHFileOperationW return error.

Ok, I write a test, but it wouldn't be soon.

-- 
Best wishes,
Vitaly Perov
Russia, Saint-Petersburg. www.etersoft.ru



More information about the wine-devel mailing list