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
8630b8ab
Commit
8630b8ab
authored
Oct 04, 2005
by
Juan Lang
Committed by
Alexandre Julliard
Oct 04, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use wine_get_dos_file_name rather than relying on GetFullPathNameW
hack.
parent
6ab0b019
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
11 deletions
+27
-11
shellpath.c
dlls/shell32/shellpath.c
+27
-11
No files found.
dlls/shell32/shellpath.c
View file @
8630b8ab
...
...
@@ -1265,12 +1265,19 @@ static HRESULT _SHGetDefaultValue(BYTE folder, LPWSTR pszPath)
/* special case for "My Documents", map to $HOME */
if
(
home
)
{
WCHAR
homeW
[
MAX_PATH
]
;
LPWSTR
homeW
=
wine_get_dos_file_name
(
home
)
;
MultiByteToWideChar
(
CP_UNIXCP
,
0
,
home
,
-
1
,
homeW
,
MAX_PATH
);
if
(
GetFullPathNameW
(
homeW
,
MAX_PATH
,
pszPath
,
NULL
)
!=
0
&&
PathIsDirectoryW
(
pszPath
))
hr
=
S_OK
;
if
(
homeW
)
{
if
(
PathIsDirectoryW
(
homeW
))
{
lstrcpynW
(
pszPath
,
homeW
,
MAX_PATH
);
hr
=
S_OK
;
}
HeapFree
(
GetProcessHeap
(),
0
,
homeW
);
}
else
hr
=
HRESULT_FROM_WIN32
(
GetLastError
());
}
break
;
}
...
...
@@ -1282,13 +1289,22 @@ static HRESULT _SHGetDefaultValue(BYTE folder, LPWSTR pszPath)
/* special case for Desktop, map to $HOME/Desktop if it exists */
if
(
home
)
{
WCHAR
desktopW
[
MAX_PATH
]
;
LPWSTR
homeW
=
wine_get_dos_file_name
(
home
)
;
MultiByteToWideChar
(
CP_UNIXCP
,
0
,
home
,
-
1
,
desktopW
,
MAX_PATH
);
PathAppendW
(
desktopW
,
DesktopW
);
if
(
GetFullPathNameW
(
desktopW
,
MAX_PATH
,
pszPath
,
NULL
)
!=
0
&&
PathIsDirectoryW
(
pszPath
))
hr
=
S_OK
;
if
(
homeW
)
{
lstrcpynW
(
pszPath
,
homeW
,
MAX_PATH
);
if
(
PathAppendW
(
pszPath
,
DesktopW
))
{
if
(
PathIsDirectoryW
(
pszPath
))
hr
=
S_OK
;
}
else
hr
=
HRESULT_FROM_WIN32
(
GetLastError
());
HeapFree
(
GetProcessHeap
(),
0
,
homeW
);
}
else
hr
=
HRESULT_FROM_WIN32
(
GetLastError
());
}
break
;
}
...
...
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