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
96fb659b
Commit
96fb659b
authored
Apr 01, 2013
by
Piotr Caban
Committed by
Alexandre Julliard
Apr 01, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wininet: Use short path name when container path can't be converted to CP_ACP.
parent
e4e79e71
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
0 deletions
+15
-0
urlcache.c
dlls/wininet/urlcache.c
+15
-0
No files found.
dlls/wininet/urlcache.c
View file @
96fb659b
...
@@ -770,6 +770,7 @@ static void cache_containers_init(void)
...
@@ -770,6 +770,7 @@ static void cache_containers_init(void)
WCHAR
wszCachePath
[
MAX_PATH
];
WCHAR
wszCachePath
[
MAX_PATH
];
WCHAR
wszMutexName
[
MAX_PATH
];
WCHAR
wszMutexName
[
MAX_PATH
];
int
path_len
,
suffix_len
;
int
path_len
,
suffix_len
;
BOOL
def_char
;
if
(
!
SHGetSpecialFolderPathW
(
NULL
,
wszCachePath
,
DefaultContainerData
[
i
].
nFolder
,
TRUE
))
if
(
!
SHGetSpecialFolderPathW
(
NULL
,
wszCachePath
,
DefaultContainerData
[
i
].
nFolder
,
TRUE
))
{
{
...
@@ -797,6 +798,20 @@ static void cache_containers_init(void)
...
@@ -797,6 +798,20 @@ static void cache_containers_init(void)
wszCachePath
[
path_len
+
suffix_len
+
2
]
=
'\0'
;
wszCachePath
[
path_len
+
suffix_len
+
2
]
=
'\0'
;
}
}
if
(
!
WideCharToMultiByte
(
CP_ACP
,
WC_NO_BEST_FIT_CHARS
,
wszCachePath
,
path_len
,
NULL
,
0
,
NULL
,
&
def_char
)
||
def_char
)
{
WCHAR
tmp
[
MAX_PATH
];
/* cannot convert path to ANSI code page */
if
(
!
(
path_len
=
GetShortPathNameW
(
wszCachePath
,
tmp
,
MAX_PATH
))
||
!
WideCharToMultiByte
(
CP_ACP
,
WC_NO_BEST_FIT_CHARS
,
tmp
,
path_len
,
NULL
,
0
,
NULL
,
&
def_char
)
||
def_char
)
ERR
(
"Can't create container path accessible by ANSI functions
\n
"
);
else
memcpy
(
wszCachePath
,
tmp
,
(
path_len
+
1
)
*
sizeof
(
WCHAR
));
}
cache_containers_add
(
DefaultContainerData
[
i
].
cache_prefix
,
wszCachePath
,
cache_containers_add
(
DefaultContainerData
[
i
].
cache_prefix
,
wszCachePath
,
DefaultContainerData
[
i
].
default_entry_type
,
wszMutexName
);
DefaultContainerData
[
i
].
default_entry_type
,
wszMutexName
);
}
}
...
...
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