Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
5acb82fc
Commit
5acb82fc
authored
Mar 19, 2015
by
Dmitry Timoshkov
Committed by
Alexandre Julliard
Mar 19, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shell32: Fix SHFileOperation(FO_MOVE) for a directory with subdirectories.
parent
5614ae23
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 addition
and
31 deletions
+1
-31
shlfileop.c
dlls/shell32/shlfileop.c
+1
-30
shlfileop.c
dlls/shell32/tests/shlfileop.c
+0
-1
No files found.
dlls/shell32/shlfileop.c
View file @
5acb82fc
...
@@ -1389,42 +1389,13 @@ static DWORD delete_files(LPSHFILEOPSTRUCTW lpFileOp, const FILE_LIST *flFrom)
...
@@ -1389,42 +1389,13 @@ static DWORD delete_files(LPSHFILEOPSTRUCTW lpFileOp, const FILE_LIST *flFrom)
return
ERROR_SUCCESS
;
return
ERROR_SUCCESS
;
}
}
static
void
move_dir_to_dir
(
LPSHFILEOPSTRUCTW
lpFileOp
,
const
FILE_ENTRY
*
feFrom
,
LPCWSTR
szDestPath
)
{
WCHAR
szFrom
[
MAX_PATH
],
szTo
[
MAX_PATH
];
SHFILEOPSTRUCTW
fileOp
;
static
const
WCHAR
wildCardFiles
[]
=
{
'*'
,
'.'
,
'*'
,
0
};
if
(
IsDotDir
(
feFrom
->
szFilename
))
return
;
SHNotifyCreateDirectoryW
(
szDestPath
,
NULL
);
PathCombineW
(
szFrom
,
feFrom
->
szFullPath
,
wildCardFiles
);
szFrom
[
lstrlenW
(
szFrom
)
+
1
]
=
'\0'
;
lstrcpyW
(
szTo
,
szDestPath
);
szTo
[
lstrlenW
(
szDestPath
)
+
1
]
=
'\0'
;
fileOp
=
*
lpFileOp
;
fileOp
.
pFrom
=
szFrom
;
fileOp
.
pTo
=
szTo
;
SHFileOperationW
(
&
fileOp
);
}
/* moves a file or directory to another directory */
/* moves a file or directory to another directory */
static
void
move_to_dir
(
LPSHFILEOPSTRUCTW
lpFileOp
,
const
FILE_ENTRY
*
feFrom
,
const
FILE_ENTRY
*
feTo
)
static
void
move_to_dir
(
LPSHFILEOPSTRUCTW
lpFileOp
,
const
FILE_ENTRY
*
feFrom
,
const
FILE_ENTRY
*
feTo
)
{
{
WCHAR
szDestPath
[
MAX_PATH
];
WCHAR
szDestPath
[
MAX_PATH
];
PathCombineW
(
szDestPath
,
feTo
->
szFullPath
,
feFrom
->
szFilename
);
PathCombineW
(
szDestPath
,
feTo
->
szFullPath
,
feFrom
->
szFilename
);
SHNotifyMoveFileW
(
feFrom
->
szFullPath
,
szDestPath
);
if
(
IsAttribFile
(
feFrom
->
attributes
))
SHNotifyMoveFileW
(
feFrom
->
szFullPath
,
szDestPath
);
else
if
(
!
(
lpFileOp
->
fFlags
&
FOF_FILESONLY
&&
feFrom
->
bFromWildcard
))
move_dir_to_dir
(
lpFileOp
,
feFrom
,
szDestPath
);
}
}
/* the FO_MOVE operation */
/* the FO_MOVE operation */
...
...
dlls/shell32/tests/shlfileop.c
View file @
5acb82fc
...
@@ -1860,7 +1860,6 @@ static void test_move(void)
...
@@ -1860,7 +1860,6 @@ static void test_move(void)
ok
(
file_exists
(
"testdir2"
),
"dir should not be moved
\n
"
);
ok
(
file_exists
(
"testdir2"
),
"dir should not be moved
\n
"
);
ok
(
!
file_exists
(
"testdir2
\\
one.txt"
),
"file should be moved
\n
"
);
ok
(
!
file_exists
(
"testdir2
\\
one.txt"
),
"file should be moved
\n
"
);
todo_wine
ok
(
!
file_exists
(
"testdir2
\\
nested"
),
"dir should be moved
\n
"
);
ok
(
!
file_exists
(
"testdir2
\\
nested"
),
"dir should be moved
\n
"
);
ok
(
!
file_exists
(
"testdir2
\\
nested
\\
two.txt"
),
"file should be moved
\n
"
);
ok
(
!
file_exists
(
"testdir2
\\
nested
\\
two.txt"
),
"file should be moved
\n
"
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment