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
0ecd807e
Commit
0ecd807e
authored
Sep 14, 2021
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shell32: Fix the shell folder file attributes.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
429154a9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
9 deletions
+12
-9
shlfolder.c
dlls/shell32/shlfolder.c
+12
-9
No files found.
dlls/shell32/shlfolder.c
View file @
0ecd807e
...
...
@@ -427,9 +427,9 @@ HRESULT SHELL32_GetItemAttributes (IShellFolder2 *psf, LPCITEMIDLIST pidl, LPDWO
}
else
if
(
has_guid
&&
HCR_GetFolderAttributes
(
pidl
,
&
dwAttributes
))
{
*
pdwAttributes
=
dwAttributes
;
}
else
if
(
_ILGetDataPointer
(
pidl
))
{
dwAttributes
=
_ILGetFileAttributes
(
pidl
,
NULL
,
0
);
DWORD
file_attr
=
_ILGetFileAttributes
(
pidl
,
NULL
,
0
);
if
(
!
dwAttributes
&&
has_guid
)
{
if
(
!
file_attr
&&
has_guid
)
{
WCHAR
path
[
MAX_PATH
];
STRRET
strret
;
...
...
@@ -441,25 +441,28 @@ HRESULT SHELL32_GetItemAttributes (IShellFolder2 *psf, LPCITEMIDLIST pidl, LPDWO
/* call GetFileAttributes() only for file system paths, not for parsing names like "::{...}" */
if
(
SUCCEEDED
(
hr
)
&&
path
[
0
]
!=
':'
)
dwAttributes
=
GetFileAttributesW
(
path
);
file_attr
=
GetFileAttributesW
(
path
);
}
}
/* Set common attributes */
*
pdwAttributes
|=
SFGAO_FILESYSTEM
|
SFGAO_DROPTARGET
|
SFGAO_HASPROPSHEET
|
SFGAO_CANDELETE
|
*
pdwAttributes
|=
SFGAO_FILESYSTEM
|
SFGAO_DROPTARGET
|
SFGAO_HASPROPSHEET
|
SFGAO_CANDELETE
|
SFGAO_CANRENAME
|
SFGAO_CANLINK
|
SFGAO_CANMOVE
|
SFGAO_CANCOPY
;
if
(
dwAttributes
&
FILE_ATTRIBUTE_DIRECTORY
)
*
pdwAttributes
|=
(
SFGAO_FOLDER
|
SFGAO_HASSUBFOLDER
|
SFGAO_FILESYSANCESTOR
);
if
(
file_attr
&
FILE_ATTRIBUTE_DIRECTORY
)
*
pdwAttributes
|=
(
SFGAO_FOLDER
|
SFGAO_HASSUBFOLDER
|
SFGAO_FILESYSANCESTOR
|
SFGAO_STORAGEANCESTOR
|
SFGAO_STORAGE
);
else
*
pdwAttributes
&=
~
(
SFGAO_FOLDER
|
SFGAO_HASSUBFOLDER
|
SFGAO_FILESYSANCESTOR
);
{
*
pdwAttributes
&=
~
(
SFGAO_FOLDER
|
SFGAO_HASSUBFOLDER
|
SFGAO_FILESYSANCESTOR
|
SFGAO_STORAGEANCESTOR
|
SFGAO_STORAGE
);
*
pdwAttributes
|=
SFGAO_STREAM
;
}
if
(
dwAttributes
&
FILE_ATTRIBUTE_HIDDEN
)
if
(
file_attr
&
FILE_ATTRIBUTE_HIDDEN
)
*
pdwAttributes
|=
SFGAO_HIDDEN
;
else
*
pdwAttributes
&=
~
SFGAO_HIDDEN
;
if
(
dwAttributes
&
FILE_ATTRIBUTE_READONLY
)
if
(
file_attr
&
FILE_ATTRIBUTE_READONLY
)
*
pdwAttributes
|=
SFGAO_READONLY
;
else
*
pdwAttributes
&=
~
SFGAO_READONLY
;
...
...
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