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
2f877b0a
Commit
2f877b0a
authored
Jul 22, 2010
by
Damjan Jovanovic
Committed by
Alexandre Julliard
Jul 23, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Convert even Unix paths outside Wine's drive mappings to DOS paths.
parent
b8a40388
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
1 deletion
+24
-1
path.c
dlls/ntdll/path.c
+24
-1
No files found.
dlls/ntdll/path.c
View file @
2f877b0a
...
...
@@ -1020,6 +1020,7 @@ NTSTATUS WINAPI RtlSetCurrentDirectory_U(const UNICODE_STRING* dir)
NTSTATUS
CDECL
wine_unix_to_nt_file_name
(
const
ANSI_STRING
*
name
,
UNICODE_STRING
*
nt
)
{
static
const
WCHAR
prefixW
[]
=
{
'\\'
,
'?'
,
'?'
,
'\\'
,
'A'
,
':'
,
'\\'
};
static
const
WCHAR
unix_prefixW
[]
=
{
'\\'
,
'?'
,
'?'
,
'\\'
,
'u'
,
'n'
,
'i'
,
'x'
};
unsigned
int
lenW
,
lenA
=
name
->
Length
;
const
char
*
path
=
name
->
Buffer
;
char
*
cwd
;
...
...
@@ -1057,7 +1058,29 @@ NTSTATUS CDECL wine_unix_to_nt_file_name( const ANSI_STRING *name, UNICODE_STRIN
lenA
-=
(
path
-
name
->
Buffer
);
}
if
(
status
!=
STATUS_SUCCESS
)
goto
done
;
if
(
status
!=
STATUS_SUCCESS
)
{
if
(
status
==
STATUS_OBJECT_PATH_NOT_FOUND
)
{
lenW
=
ntdll_umbstowcs
(
0
,
path
,
lenA
,
NULL
,
0
);
nt
->
Buffer
=
RtlAllocateHeap
(
GetProcessHeap
(),
0
,
(
lenW
+
1
)
*
sizeof
(
WCHAR
)
+
sizeof
(
unix_prefixW
)
);
if
(
nt
->
Buffer
==
NULL
)
{
status
=
STATUS_NO_MEMORY
;
goto
done
;
}
memcpy
(
nt
->
Buffer
,
unix_prefixW
,
sizeof
(
unix_prefixW
)
);
ntdll_umbstowcs
(
0
,
path
,
lenA
,
nt
->
Buffer
+
sizeof
(
unix_prefixW
)
/
sizeof
(
WCHAR
),
lenW
);
lenW
+=
sizeof
(
unix_prefixW
)
/
sizeof
(
WCHAR
);
nt
->
Buffer
[
lenW
]
=
0
;
nt
->
Length
=
lenW
*
sizeof
(
WCHAR
);
nt
->
MaximumLength
=
nt
->
Length
+
sizeof
(
WCHAR
);
for
(
p
=
nt
->
Buffer
+
sizeof
(
unix_prefixW
)
/
sizeof
(
WCHAR
);
*
p
;
p
++
)
if
(
*
p
==
'/'
)
*
p
=
'\\'
;
status
=
STATUS_SUCCESS
;
}
goto
done
;
}
while
(
lenA
&&
path
[
0
]
==
'/'
)
{
lenA
--
;
path
++
;
}
lenW
=
ntdll_umbstowcs
(
0
,
path
,
lenA
,
NULL
,
0
);
...
...
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