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
76df4327
Commit
76df4327
authored
Mar 19, 2001
by
Eric Kohl
Committed by
Alexandre Julliard
Mar 19, 2001
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
SHGetSpecialFolderPathA must be able to create a full path if it
doesn't exist.
parent
03df00e9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
5 deletions
+18
-5
shellpath.c
dlls/shell32/shellpath.c
+18
-5
No files found.
dlls/shell32/shellpath.c
View file @
76df4327
...
...
@@ -917,11 +917,12 @@ BOOL WINAPI SHGetSpecialFolderPathA (
DWORD
csidl
,
BOOL
bCreate
)
{
CHAR
szValueName
[
MAX_PATH
],
szDefaultPath
[
MAX_PATH
];
CHAR
szValueName
[
MAX_PATH
],
szDefaultPath
[
MAX_PATH
]
,
szBuildPath
[
MAX_PATH
]
;
HKEY
hRootKey
,
hKey
;
DWORD
dwFlags
;
DWORD
dwType
,
dwDisp
,
dwPathLen
=
MAX_PATH
;
DWORD
folder
=
csidl
&
CSIDL_FOLDER_MASK
;
CHAR
*
p
;
TRACE
(
"0x%04x,%p,csidl=%lu,0x%04x
\n
"
,
hwndOwner
,
szPath
,
csidl
,
bCreate
);
...
...
@@ -1023,11 +1024,23 @@ BOOL WINAPI SHGetSpecialFolderPathA (
/* not existing but we are not allowed to create it */
if
(
!
bCreate
)
return
FALSE
;
if
(
!
CreateDirectoryA
(
szPath
,
NULL
))
/* create directory/directories */
strcpy
(
szBuildPath
,
szPath
);
p
=
strchr
(
szBuildPath
,
'\\'
);
while
(
p
)
{
ERR
(
"Failed to create directory '%s'.
\n
"
,
szPath
);
return
FALSE
;
*
p
=
0
;
if
(
!
PathFileExistsA
(
szBuildPath
))
{
if
(
!
CreateDirectoryA
(
szBuildPath
,
NULL
))
{
ERR
(
"Failed to create directory '%s'.
\n
"
,
szPath
);
return
FALSE
;
}
}
*
p
=
'\\'
;
p
=
strchr
(
p
+
1
,
'\\'
);
}
MESSAGE
(
"Created not existing system directory '%s'
\n
"
,
szPath
);
...
...
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