Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
77bb698b
Commit
77bb698b
authored
Apr 17, 2020
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mountmgr.sys: Avoid using wine_get_config_dir().
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
a094f517
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
8 deletions
+21
-8
device.c
dlls/mountmgr.sys/device.c
+21
-8
No files found.
dlls/mountmgr.sys/device.c
View file @
77bb698b
...
...
@@ -38,7 +38,6 @@
#include "winuser.h"
#include "dbt.h"
#include "wine/library.h"
#include "wine/list.h"
#include "wine/unicode.h"
#include "wine/debug.h"
...
...
@@ -131,12 +130,19 @@ static CRITICAL_SECTION device_section = { &critsect_debug, -1, 0, 0, 0, 0 };
static
char
*
get_dosdevices_path
(
char
**
device
)
{
const
char
*
config_dir
=
wine_get_config_dir
();
size_t
len
=
strlen
(
config_dir
)
+
sizeof
(
"/dosdevices/com256"
);
const
char
*
home
=
getenv
(
"HOME"
);
const
char
*
prefix
=
getenv
(
"WINEPREFIX"
);
size_t
len
=
(
prefix
?
strlen
(
prefix
)
:
strlen
(
home
)
+
strlen
(
"/.wine"
))
+
sizeof
(
"/dosdevices/com256"
);
char
*
path
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
);
if
(
path
)
{
strcpy
(
path
,
config_dir
);
if
(
prefix
)
strcpy
(
path
,
prefix
);
else
{
strcpy
(
path
,
home
);
strcat
(
path
,
"/.wine"
);
}
strcat
(
path
,
"/dosdevices/a::"
);
*
device
=
path
+
len
-
sizeof
(
"com256"
);
}
...
...
@@ -254,13 +260,20 @@ static int open_volume_file( const struct volume *volume, const char *file )
}
else
{
const
char
*
config_dir
=
wine_get_config_dir
();
const
char
*
home
=
getenv
(
"HOME"
);
const
char
*
prefix
=
getenv
(
"WINEPREFIX"
);
size_t
len
=
prefix
?
strlen
(
prefix
)
:
strlen
(
home
)
+
strlen
(
"/.wine"
);
if
(
!
(
path
=
HeapAlloc
(
GetProcessHeap
(),
0
,
strlen
(
config_dir
)
+
strlen
(
"/dosdevices/"
)
+
strlen
(
unix_mount
)
+
1
+
strlen
(
file
)
+
1
)))
if
(
!
(
path
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
+
strlen
(
"/dosdevices/"
)
+
strlen
(
unix_mount
)
+
1
+
strlen
(
file
)
+
1
)))
return
-
1
;
strcpy
(
path
,
config_dir
);
if
(
prefix
)
strcpy
(
path
,
prefix
);
else
{
strcpy
(
path
,
home
);
strcat
(
path
,
"/.wine"
);
}
strcat
(
path
,
"/dosdevices/"
);
strcat
(
path
,
unix_mount
);
}
...
...
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