shell32: Create nonexistent destination directories in FO_MOVE.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=25207
This commit is contained in:
parent
19627b13e4
commit
b4a5775ffb
2 changed files with 6 additions and 4 deletions
|
@ -1398,6 +1398,7 @@ static int move_files(LPSHFILEOPSTRUCTW lpFileOp, const FILE_LIST *flFrom, const
|
||||||
INT mismatched = 0;
|
INT mismatched = 0;
|
||||||
const FILE_ENTRY *entryToMove;
|
const FILE_ENTRY *entryToMove;
|
||||||
const FILE_ENTRY *fileDest;
|
const FILE_ENTRY *fileDest;
|
||||||
|
int ret;
|
||||||
|
|
||||||
if (!flFrom->dwNumFiles)
|
if (!flFrom->dwNumFiles)
|
||||||
return ERROR_SUCCESS;
|
return ERROR_SUCCESS;
|
||||||
|
@ -1418,8 +1419,9 @@ static int move_files(LPSHFILEOPSTRUCTW lpFileOp, const FILE_LIST *flFrom, const
|
||||||
return ERROR_CANCELLED;
|
return ERROR_CANCELLED;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!PathFileExistsW(flTo->feFiles[0].szDirectory))
|
ret = SHCreateDirectoryExW(NULL, flTo->feFiles[0].szDirectory, NULL);
|
||||||
return ERROR_CANCELLED;
|
if (ret && ret != ERROR_ALREADY_EXISTS)
|
||||||
|
return ret;
|
||||||
|
|
||||||
if (lpFileOp->fFlags & FOF_MULTIDESTFILES)
|
if (lpFileOp->fFlags & FOF_MULTIDESTFILES)
|
||||||
mismatched = flFrom->dwNumFiles - flTo->dwNumFiles;
|
mismatched = flFrom->dwNumFiles - flTo->dwNumFiles;
|
||||||
|
|
|
@ -2165,8 +2165,8 @@ static void test_move(void)
|
||||||
shfo.pFrom = "test2.txt\0";
|
shfo.pFrom = "test2.txt\0";
|
||||||
shfo.pTo = "dir1\\dir2\\test2.txt\0";
|
shfo.pTo = "dir1\\dir2\\test2.txt\0";
|
||||||
retval = SHFileOperationA(&shfo);
|
retval = SHFileOperationA(&shfo);
|
||||||
todo_wine ok(!retval, "got %ld\n", retval);
|
ok(!retval, "got %ld\n", retval);
|
||||||
todo_wine ok(DeleteFileA("dir1\\dir2\\test2.txt"), "Expected dir1\\dir2\\test2.txt to exist\n");
|
ok(DeleteFileA("dir1\\dir2\\test2.txt"), "Expected dir1\\dir2\\test2.txt to exist\n");
|
||||||
RemoveDirectoryA("dir1\\dir2");
|
RemoveDirectoryA("dir1\\dir2");
|
||||||
RemoveDirectoryA("dir1");
|
RemoveDirectoryA("dir1");
|
||||||
createTestFile("test2.txt");
|
createTestFile("test2.txt");
|
||||||
|
|
Loading…
Add table
Reference in a new issue