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
c0f693f6
Commit
c0f693f6
authored
Feb 12, 2019
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Hardcode the path of the windows directory for redirects.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
7a122604
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
18 deletions
+10
-18
directory.c
dlls/ntdll/directory.c
+10
-18
No files found.
dlls/ntdll/directory.c
View file @
c0f693f6
...
...
@@ -2269,25 +2269,16 @@ done:
*/
static
void
init_redirects
(
void
)
{
UNICODE_STRING
nt_name
;
ANSI_STRING
unix_name
;
NTSTATUS
status
;
static
const
char
windows_dir
[]
=
"/dosdevices/c:/windows"
;
const
char
*
config_dir
=
wine_get_config_dir
()
;
char
*
dir
;
struct
stat
st
;
unsigned
int
i
;
if
(
!
RtlDosPathNameToNtPathName_U
(
user_shared_data
->
NtSystemRoot
,
&
nt_name
,
NULL
,
NULL
))
{
ERR
(
"can't convert %s
\n
"
,
debugstr_w
(
user_shared_data
->
NtSystemRoot
)
);
return
;
}
status
=
wine_nt_to_unix_file_name
(
&
nt_name
,
&
unix_name
,
FILE_OPEN_IF
,
FALSE
);
RtlFreeUnicodeString
(
&
nt_name
);
if
(
status
)
{
ERR
(
"cannot open %s (%x)
\n
"
,
debugstr_w
(
user_shared_data
->
NtSystemRoot
),
status
);
return
;
}
if
(
!
stat
(
unix_name
.
Buffer
,
&
st
))
if
(
!
(
dir
=
RtlAllocateHeap
(
GetProcessHeap
(),
0
,
strlen
(
config_dir
)
+
sizeof
(
windows_dir
)
)))
return
;
strcpy
(
dir
,
config_dir
);
strcat
(
dir
,
windows_dir
);
if
(
!
stat
(
dir
,
&
st
))
{
windir
.
dev
=
st
.
st_dev
;
windir
.
ino
=
st
.
st_ino
;
...
...
@@ -2295,11 +2286,12 @@ static void init_redirects(void)
for
(
i
=
0
;
i
<
nb_redirects
;
i
++
)
{
if
(
!
redirects
[
i
].
dos_target
)
continue
;
redirects
[
i
].
unix_target
=
get_redirect_target
(
unix_name
.
Buffe
r
,
redirects
[
i
].
dos_target
);
redirects
[
i
].
unix_target
=
get_redirect_target
(
di
r
,
redirects
[
i
].
dos_target
);
TRACE
(
"%s -> %s
\n
"
,
debugstr_w
(
redirects
[
i
].
source
),
redirects
[
i
].
unix_target
);
}
}
RtlFreeAnsiString
(
&
unix_name
);
else
ERR
(
"%s: %s
\n
"
,
dir
,
strerror
(
errno
)
);
RtlFreeHeap
(
GetProcessHeap
(),
0
,
dir
);
}
...
...
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