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
49be8db6
Commit
49be8db6
authored
Jan 28, 2010
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shell32: Put the temp directory inside the user profile directory.
parent
6beb82e2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
38 additions
and
0 deletions
+38
-0
shellpath.c
dlls/shell32/shellpath.c
+38
-0
No files found.
dlls/shell32/shellpath.c
View file @
49be8db6
...
...
@@ -2268,6 +2268,42 @@ static void _SHCreateSymbolicLinks(void)
}
}
/******************************************************************************
* create_extra_folders [Internal]
*
* Create some extra folders that don't have a standard CSIDL definition.
*/
static
HRESULT
create_extra_folders
(
void
)
{
static
const
WCHAR
environW
[]
=
{
'E'
,
'n'
,
'v'
,
'i'
,
'r'
,
'o'
,
'n'
,
'm'
,
'e'
,
'n'
,
't'
,
0
};
static
const
WCHAR
TempW
[]
=
{
'T'
,
'e'
,
'm'
,
'p'
,
0
};
static
const
WCHAR
TEMPW
[]
=
{
'T'
,
'E'
,
'M'
,
'P'
,
0
};
static
const
WCHAR
TMPW
[]
=
{
'T'
,
'M'
,
'P'
,
0
};
WCHAR
path
[
MAX_PATH
+
5
];
HRESULT
hr
;
HKEY
hkey
;
DWORD
type
,
size
,
ret
;
ret
=
RegCreateKeyW
(
HKEY_CURRENT_USER
,
environW
,
&
hkey
);
if
(
ret
)
return
HRESULT_FROM_WIN32
(
ret
);
/* FIXME: should be under AppData, but we don't want spaces in the temp path */
hr
=
SHGetFolderPathAndSubDirW
(
0
,
CSIDL_PROFILE
|
CSIDL_FLAG_CREATE
,
NULL
,
SHGFP_TYPE_DEFAULT
,
TempW
,
path
);
if
(
SUCCEEDED
(
hr
))
{
size
=
sizeof
(
path
);
if
(
RegQueryValueExW
(
hkey
,
TEMPW
,
NULL
,
&
type
,
(
LPBYTE
)
path
,
&
size
))
RegSetValueExW
(
hkey
,
TEMPW
,
0
,
REG_SZ
,
(
LPBYTE
)
path
,
(
strlenW
(
path
)
+
1
)
*
sizeof
(
WCHAR
)
);
size
=
sizeof
(
path
);
if
(
RegQueryValueExW
(
hkey
,
TMPW
,
NULL
,
&
type
,
(
LPBYTE
)
path
,
&
size
))
RegSetValueExW
(
hkey
,
TMPW
,
0
,
REG_SZ
,
(
LPBYTE
)
path
,
(
strlenW
(
path
)
+
1
)
*
sizeof
(
WCHAR
)
);
}
RegCloseKey
(
hkey
);
return
hr
;
}
/* Register the default values in the registry, as some apps seem to depend
* on their presence. The set registered was taken from Windows XP.
*/
...
...
@@ -2286,6 +2322,8 @@ HRESULT SHELL_RegisterShellFolders(void)
hr
=
_SHRegisterUserShellFolders
(
FALSE
);
if
(
SUCCEEDED
(
hr
))
hr
=
_SHRegisterCommonShellFolders
();
if
(
SUCCEEDED
(
hr
))
hr
=
create_extra_folders
();
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