Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
45bcdd2b
Commit
45bcdd2b
authored
May 05, 2005
by
Michael Jung
Committed by
Alexandre Julliard
May 05, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed GetDisplayNameOf method to not depend on incorrect behaviour
regarding the SHGDN_INFOLDER flag.
parent
ddc26aa9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
38 deletions
+25
-38
shfldr_fs.c
dlls/shell32/shfldr_fs.c
+25
-38
No files found.
dlls/shell32/shfldr_fs.c
View file @
45bcdd2b
...
...
@@ -749,56 +749,43 @@ IShellFolder_fnGetDisplayNameOf (IShellFolder2 * iface, LPCITEMIDLIST pidl,
{
_ICOM_THIS_From_IShellFolder2
(
IGenericSFImpl
,
iface
)
CHAR
szPath
[
MAX_PATH
]
;
HRESULT
hr
=
S_OK
;
int
len
=
0
;
BOOL
bSimplePidl
;
*
szPath
=
'\0'
;
TRACE
(
"(%p)->(pidl=%p,0x%08lx,%p)
\n
"
,
This
,
pidl
,
dwFlags
,
strRet
);
pdump
(
pidl
);
if
(
!
pidl
||
!
strRet
)
return
E_INVALIDARG
;
bSimplePidl
=
_ILIsPidlSimple
(
pidl
);
/* take names of special folders only if its only this folder */
if
(
_ILIsSpecialFolder
(
pidl
))
{
if
(
bSimplePidl
)
{
_ILSimpleGetText
(
pidl
,
szPath
,
MAX_PATH
);
/* append my own path */
strRet
->
uType
=
STRRET_CSTR
;
if
(
_ILIsDesktop
(
pidl
))
{
/* empty pidl */
if
((
GET_SHGDN_FOR
(
dwFlags
)
==
SHGDN_FORPARSING
)
&&
(
GET_SHGDN_RELATION
(
dwFlags
)
!=
SHGDN_INFOLDER
))
{
if
(
This
->
sPathTarget
)
lstrcpynA
(
strRet
->
u
.
cStr
,
This
->
sPathTarget
,
MAX_PATH
);
}
else
{
FIXME
(
"special pidl
\n
"
);
/* pidl has to contain exactly one non null SHITEMID */
hr
=
E_INVALIDARG
;
}
}
else
{
if
(
!
(
dwFlags
&
SHGDN_INFOLDER
)
&&
(
dwFlags
&
SHGDN_FORPARSING
)
&&
This
->
sPathTarget
)
{
/* get path to root */
lstrcpyA
(
szPath
,
This
->
sPathTarget
);
PathAddBackslashA
(
szPath
);
len
=
lstrlenA
(
szPath
);
}
else
if
(
_ILIsPidlSimple
(
pidl
))
{
if
((
GET_SHGDN_FOR
(
dwFlags
)
==
SHGDN_FORPARSING
)
&&
(
GET_SHGDN_RELATION
(
dwFlags
)
!=
SHGDN_INFOLDER
)
&&
This
->
sPathTarget
)
{
lstrcpynA
(
strRet
->
u
.
cStr
,
This
->
sPathTarget
,
MAX_PATH
);
PathAddBackslashA
(
strRet
->
u
.
cStr
);
len
=
lstrlenA
(
strRet
->
u
.
cStr
);
}
/* append my own path */
_ILSimpleGetText
(
pidl
,
szPath
+
len
,
MAX_PATH
-
len
);
if
(
!
_ILIsFolder
(
pidl
))
SHELL_FS_ProcessDisplayFilename
(
szPath
,
dwFlags
);
}
/* go deeper if needed */
if
((
dwFlags
&
SHGDN_FORPARSING
)
&&
!
bSimplePidl
)
{
PathAddBackslashA
(
szPath
);
len
=
lstrlenA
(
szPath
);
if
(
!
SUCCEEDED
(
SHELL32_GetDisplayNameOfChild
(
iface
,
pidl
,
dwFlags
|
SHGDN_INFOLDER
,
szPath
+
len
,
MAX_PATH
-
len
)))
return
E_OUTOFMEMORY
;
_ILSimpleGetText
(
pidl
,
strRet
->
u
.
cStr
+
len
,
MAX_PATH
-
len
);
if
(
!
_ILIsFolder
(
pidl
))
SHELL_FS_ProcessDisplayFilename
(
strRet
->
u
.
cStr
,
dwFlags
);
}
else
{
hr
=
SHELL32_GetDisplayNameOfChild
(
iface
,
pidl
,
dwFlags
,
strRet
->
u
.
cStr
,
MAX_PATH
);
}
strRet
->
uType
=
STRRET_CSTR
;
lstrcpynA
(
strRet
->
u
.
cStr
,
szPath
,
MAX_PATH
);
TRACE
(
"-- (%p)->(%s)
\n
"
,
This
,
s
zPath
);
return
S_OK
;
TRACE
(
"-- (%p)->(%s)
\n
"
,
This
,
s
trRet
->
u
.
cStr
);
return
hr
;
}
/**************************************************************************
...
...
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