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
95c9dee3
Commit
95c9dee3
authored
Nov 28, 2019
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wineboot: Keep config directory path in Unicode.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
e87c84f5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
22 deletions
+13
-22
wineboot.c
programs/wineboot/wineboot.c
+13
-22
No files found.
programs/wineboot/wineboot.c
View file @
95c9dee3
...
...
@@ -160,21 +160,21 @@ done:
}
/* print the config directory in a more Unix-ish way */
static
const
char
*
prettyprint_configdir
(
void
)
static
const
WCHAR
*
prettyprint_configdir
(
void
)
{
static
char
buffer
[
MAX_PATH
];
WCHAR
*
path
=
_wgetenv
(
wineconfigdirW
);
char
*
p
;
static
WCHAR
buffer
[
MAX_PATH
];
WCHAR
*
p
,
*
path
=
_wgetenv
(
wineconfigdirW
);
if
(
!
WideCharToMultiByte
(
CP_UNIXCP
,
0
,
path
,
-
1
,
buffer
,
ARRAY_SIZE
(
buffer
),
NULL
,
NULL
))
strcpy
(
buffer
+
ARRAY_SIZE
(
buffer
)
-
4
,
"..."
);
lstrcpynW
(
buffer
,
path
,
ARRAY_SIZE
(
buffer
)
);
if
(
lstrlenW
(
wineconfigdirW
)
>=
ARRAY_SIZE
(
buffer
)
)
lstrcpyW
(
buffer
+
ARRAY_SIZE
(
buffer
)
-
4
,
L"..."
);
if
(
!
strncmp
(
buffer
,
"
\\
??
\\
unix
\\
"
,
9
))
if
(
!
wcsncmp
(
buffer
,
L
"
\\
??
\\
unix
\\
"
,
9
))
{
for
(
p
=
buffer
+
9
;
*
p
;
p
++
)
if
(
*
p
==
'\\'
)
*
p
=
'/'
;
return
buffer
+
9
;
}
else
if
(
!
strncmp
(
buffer
,
"
\\
??
\\
Z:
\\
"
,
7
))
else
if
(
!
wcsncmp
(
buffer
,
L
"
\\
??
\\
Z:
\\
"
,
7
))
{
for
(
p
=
buffer
+
6
;
*
p
;
p
++
)
if
(
*
p
==
'\\'
)
*
p
=
'/'
;
return
buffer
+
6
;
...
...
@@ -1064,18 +1064,9 @@ static INT_PTR CALLBACK wait_dlgproc( HWND hwnd, UINT msg, WPARAM wp, LPARAM lp
static
HWND
show_wait_window
(
void
)
{
const
char
*
config_dir
=
prettyprint_configdir
();
WCHAR
*
name
;
HWND
hwnd
;
DWORD
len
;
len
=
MultiByteToWideChar
(
CP_UNIXCP
,
0
,
config_dir
,
-
1
,
NULL
,
0
);
name
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
*
sizeof
(
WCHAR
)
);
MultiByteToWideChar
(
CP_UNIXCP
,
0
,
config_dir
,
-
1
,
name
,
len
);
hwnd
=
CreateDialogParamW
(
GetModuleHandleW
(
0
),
MAKEINTRESOURCEW
(
IDD_WAITDLG
),
0
,
wait_dlgproc
,
(
LPARAM
)
name
);
HWND
hwnd
=
CreateDialogParamW
(
GetModuleHandleW
(
0
),
MAKEINTRESOURCEW
(
IDD_WAITDLG
),
0
,
wait_dlgproc
,
(
LPARAM
)
prettyprint_configdir
()
);
ShowWindow
(
hwnd
,
SW_SHOWNORMAL
);
HeapFree
(
GetProcessHeap
(),
0
,
name
);
return
hwnd
;
}
...
...
@@ -1227,13 +1218,13 @@ static void update_wineprefix( BOOL force )
if
(
!
inf_path
)
{
WINE_MESSAGE
(
"wine: failed to update %s, wine.inf not found
\n
"
,
prettyprint_configdir
()
);
WINE_MESSAGE
(
"wine: failed to update %s, wine.inf not found
\n
"
,
debugstr_w
(
config_dir
)
);
return
;
}
if
((
fd
=
_wopen
(
inf_path
,
O_RDONLY
))
==
-
1
)
{
WINE_MESSAGE
(
"wine: failed to update %s with %s: %s
\n
"
,
prettyprint_configdir
(
),
debugstr_w
(
inf_path
),
strerror
(
errno
)
);
debugstr_w
(
config_dir
),
debugstr_w
(
inf_path
),
strerror
(
errno
)
);
goto
done
;
}
fstat
(
fd
,
&
st
);
...
...
@@ -1263,7 +1254,7 @@ static void update_wineprefix( BOOL force )
install_root_pnp_devices
();
update_user_profile
();
WINE_MESSAGE
(
"wine: configuration in
'%s' has been updated.
\n
"
,
prettyprint_configdir
(
)
);
WINE_MESSAGE
(
"wine: configuration in
%s has been updated.
\n
"
,
debugstr_w
(
prettyprint_configdir
()
)
);
}
done
:
...
...
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