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
cb27ab8b
Commit
cb27ab8b
authored
May 17, 2004
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added support for mapping UNC filenames to the dosdevices directory.
parent
070db4e5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
13 deletions
+27
-13
directory.c
dlls/ntdll/directory.c
+27
-13
No files found.
dlls/ntdll/directory.c
View file @
cb27ab8b
...
...
@@ -1045,39 +1045,53 @@ NTSTATUS wine_nt_to_unix_file_name( const UNICODE_STRING *nameW, ANSI_STRING *un
if
((
pos
=
get_dos_prefix_len
(
nameW
)))
{
BOOLEAN
is_unc
=
FALSE
;
name
+=
pos
;
name_len
-=
pos
;
/* check for UNC prefix */
if
(
name_len
>
4
&&
!
memicmpW
(
name
,
uncW
,
4
))
{
FIXME
(
"UNC name %s not supported
\n
"
,
debugstr_us
(
nameW
)
);
return
STATUS_OBJECT_NAME_NOT_FOUND
;
name
+=
3
;
name_len
-=
3
;
is_unc
=
TRUE
;
}
/* check for a drive letter with path */
if
(
name_len
<
3
||
!
isalphaW
(
name
[
0
])
||
name
[
1
]
!=
':'
||
!
IS_SEPARATOR
(
name
[
2
]))
else
{
/* not a drive with path, try other DOS devices */
return
get_dos_device
(
name
,
name_len
,
unix_name_ret
);
/* check for a drive letter with path */
if
(
name_len
<
3
||
!
isalphaW
(
name
[
0
])
||
name
[
1
]
!=
':'
||
!
IS_SEPARATOR
(
name
[
2
]))
{
/* not a drive with path, try other DOS devices */
return
get_dos_device
(
name
,
name_len
,
unix_name_ret
);
}
name
+=
2
;
/* skip drive letter */
name_len
-=
2
;
}
name
+=
2
;
/* skip drive letter */
name_len
-=
2
;
/* check for invalid characters */
for
(
p
=
name
;
p
<
name
+
name_len
;
p
++
)
if
(
*
p
<
32
||
strchrW
(
invalid_charsW
,
*
p
))
return
STATUS_OBJECT_NAME_INVALID
;
unix_len
=
ntdll_wcstoumbs
(
0
,
name
,
name_len
,
NULL
,
0
,
NULL
,
NULL
);
unix_len
+=
MAX_DIR_ENTRY_LEN
+
3
;
unix_len
+=
strlen
(
config_dir
)
+
sizeof
(
"/dosdevices/
a:"
)
;
unix_len
+=
strlen
(
config_dir
)
+
sizeof
(
"/dosdevices/
"
)
+
3
;
if
(
!
(
unix_name
=
RtlAllocateHeap
(
GetProcessHeap
(),
0
,
unix_len
)))
return
STATUS_NO_MEMORY
;
strcpy
(
unix_name
,
config_dir
);
strcat
(
unix_name
,
"/dosdevices/
a:
"
);
strcat
(
unix_name
,
"/dosdevices/"
);
pos
=
strlen
(
unix_name
);
unix_name
[
pos
-
2
]
=
tolowerW
(
name
[
-
2
]
);
if
(
is_unc
)
{
strcpy
(
unix_name
+
pos
,
"unc"
);
pos
+=
3
;
}
else
{
unix_name
[
pos
++
]
=
tolowerW
(
name
[
-
2
]
);
unix_name
[
pos
++
]
=
':'
;
unix_name
[
pos
]
=
0
;
}
}
else
/* no DOS prefix, assume NT native name, map directly to Unix */
{
...
...
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