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
872c07a9
Commit
872c07a9
authored
Jul 19, 2011
by
Jay Yang
Committed by
Alexandre Julliard
Jul 20, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shell32: Make ISFHelper_fnCopyItems actually copy the items.
parent
01e12ec9
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
19 deletions
+29
-19
shfldr_fs.c
dlls/shell32/shfldr_fs.c
+29
-19
No files found.
dlls/shell32/shfldr_fs.c
View file @
872c07a9
...
...
@@ -1383,13 +1383,15 @@ static HRESULT WINAPI
ISFHelper_fnCopyItems
(
ISFHelper
*
iface
,
IShellFolder
*
pSFFrom
,
UINT
cidl
,
LPCITEMIDLIST
*
apidl
)
{
UINT
i
;
HRESULT
ret
=
E_FAIL
;
IPersistFolder2
*
ppf2
=
NULL
;
char
szSrcPath
[
MAX_PATH
],
szDstPath
[
MAX_PATH
];
WCHAR
wszSrcPathRoot
[
MAX_PATH
],
wszDstPath
[
MAX_PATH
+
1
];
WCHAR
*
wszSrcPathsList
;
IGenericSFImpl
*
This
=
impl_from_ISFHelper
(
iface
);
SHFILEOPSTRUCTW
fop
;
TRACE
(
"(%p)->(%p,%u,%p)
\n
"
,
This
,
pSFFrom
,
cidl
,
apidl
);
IShellFolder_QueryInterface
(
pSFFrom
,
&
IID_IPersistFolder2
,
...
...
@@ -1398,24 +1400,32 @@ ISFHelper_fnCopyItems (ISFHelper * iface, IShellFolder * pSFFrom, UINT cidl,
LPITEMIDLIST
pidl
;
if
(
SUCCEEDED
(
IPersistFolder2_GetCurFolder
(
ppf2
,
&
pidl
)))
{
for
(
i
=
0
;
i
<
cidl
;
i
++
)
{
SHGetPathFromIDListA
(
pidl
,
szSrcPath
);
PathAddBackslashA
(
szSrcPath
);
_ILSimpleGetText
(
apidl
[
i
],
szSrcPath
+
strlen
(
szSrcPath
),
MAX_PATH
);
if
(
!
WideCharToMultiByte
(
CP_ACP
,
0
,
This
->
sPathTarget
,
-
1
,
szDstPath
,
MAX_PATH
,
NULL
,
NULL
))
szDstPath
[
0
]
=
'\0'
;
PathAddBackslashA
(
szDstPath
);
_ILSimpleGetText
(
apidl
[
i
],
szDstPath
+
strlen
(
szDstPath
),
MAX_PATH
);
MESSAGE
(
"would copy %s to %s
\n
"
,
szSrcPath
,
szDstPath
);
SHGetPathFromIDListW
(
pidl
,
wszSrcPathRoot
);
ZeroMemory
(
wszDstPath
,
MAX_PATH
+
1
);
if
(
This
->
sPathTarget
)
lstrcpynW
(
wszDstPath
,
This
->
sPathTarget
,
MAX_PATH
);
PathAddBackslashW
(
wszSrcPathRoot
);
PathAddBackslashW
(
wszDstPath
);
wszSrcPathsList
=
build_paths_list
(
wszSrcPathRoot
,
cidl
,
apidl
);
ZeroMemory
(
&
fop
,
sizeof
(
fop
));
fop
.
hwnd
=
GetActiveWindow
();
fop
.
wFunc
=
FO_COPY
;
fop
.
pFrom
=
wszSrcPathsList
;
fop
.
pTo
=
wszDstPath
;
fop
.
fFlags
=
FOF_ALLOWUNDO
;
ret
=
S_OK
;
if
(
SHFileOperationW
(
&
fop
))
{
WARN
(
"Copy failed
\n
"
);
ret
=
E_FAIL
;
}
SHFree
(
pidl
);
HeapFree
(
GetProcessHeap
(),
0
,
wszSrcPathsList
);
}
IPersistFolder2_Release
(
ppf2
);
SHFree
(
pidl
);
IPersistFolder2_Release
(
ppf2
);
}
return
S_OK
;
return
ret
;
}
static
const
ISFHelperVtbl
shvt
=
...
...
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