[Bug 45266] New: SHFileOperation FO_MOVE fails to move files to target directory

wine-bugs at winehq.org wine-bugs at winehq.org
Tue May 29 04:45:04 CDT 2018


https://bugs.winehq.org/show_bug.cgi?id=45266

            Bug ID: 45266
           Summary: SHFileOperation FO_MOVE fails to move files to target
                    directory
           Product: Wine
           Version: 2.0
          Hardware: x86
                OS: Mac OS X
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: shell32
          Assignee: wine-bugs at winehq.org
          Reporter: fheidenreich at gmail.com

When moving multiple files to one target directory, the SHFileOperation is
aborted with ERROR_CANCELLED.

I think it's caused by an erroneous check at
https://source.winehq.org/git/wine.git/blob/HEAD:/dlls/shell32/shlfileop.c#l1424

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

If the target is one single directory, FOF_MULTIDESTFILES is not set.
flFrom->bAnyDirectories is false, since no directories are moved. And
flFrom->dwNumFiles > flTo->dwNumFiles since we move multiple files to one
target directory.

I'm not sure what's the reasoning behind !flFrom->bAnyDirectories anyway. Maybe
it's just a typo and should read !flTo->bAnyDirectories

-- 
Do not reply to this email, post in Bugzilla using the
above URL to reply.
You are receiving this mail because:
You are watching all bug changes.



More information about the wine-bugs mailing list