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
7f567451
Commit
7f567451
authored
Sep 06, 2018
by
Josh DuBois
Committed by
Alexandre Julliard
Sep 06, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Use root of c: drive as fallback cwd during startup.
Signed-off-by:
Josh DuBois
<
duboisj@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
ffbb44b0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
7 deletions
+9
-7
server.c
dlls/ntdll/server.c
+9
-7
No files found.
dlls/ntdll/server.c
View file @
7f567451
...
...
@@ -1124,9 +1124,10 @@ static void start_server(void)
*
* Setup the wine configuration dir.
*/
static
void
setup_config_dir
(
void
)
static
int
setup_config_dir
(
void
)
{
const
char
*
p
,
*
config_dir
=
wine_get_config_dir
();
int
fd_cwd
=
open
(
"."
,
O_RDONLY
);
if
(
chdir
(
config_dir
)
==
-
1
)
{
...
...
@@ -1154,7 +1155,7 @@ static void setup_config_dir(void)
if
(
mkdir
(
"dosdevices"
,
0777
)
==
-
1
)
{
if
(
errno
==
EEXIST
)
return
;
if
(
errno
==
EEXIST
)
goto
done
;
fatal_perror
(
"cannot create %s/dosdevices
\n
"
,
config_dir
);
}
...
...
@@ -1163,6 +1164,11 @@ static void setup_config_dir(void)
mkdir
(
"drive_c"
,
0777
);
symlink
(
"../drive_c"
,
"dosdevices/c:"
);
symlink
(
"/"
,
"dosdevices/z:"
);
done:
if
(
fd_cwd
==
-
1
)
fd_cwd
=
open
(
"dosdevices/c:"
,
O_RDONLY
);
fcntl
(
fd_cwd
,
F_SETFD
,
FD_CLOEXEC
);
return
fd_cwd
;
}
...
...
@@ -1212,11 +1218,7 @@ static int server_connect(void)
struct
stat
st
;
int
s
,
slen
,
retry
,
fd_cwd
;
/* retrieve the current directory */
fd_cwd
=
open
(
"."
,
O_RDONLY
);
if
(
fd_cwd
!=
-
1
)
fcntl
(
fd_cwd
,
F_SETFD
,
FD_CLOEXEC
);
setup_config_dir
();
fd_cwd
=
setup_config_dir
();
serverdir
=
wine_get_server_dir
();
/* chdir to the server directory */
...
...
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