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
58343b63
Commit
58343b63
authored
May 23, 2022
by
Jacek Caban
Committed by
Alexandre Julliard
May 25, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winemac: Directly use wine_unix_to_nt_file_name.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
parent
ff88345f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
3 deletions
+25
-3
clipboard.c
dlls/winemac.drv/clipboard.c
+25
-3
No files found.
dlls/winemac.drv/clipboard.c
View file @
58343b63
...
...
@@ -565,6 +565,29 @@ static void *import_html(CFDataRef data, size_t *ret_size)
}
/* based on wine_get_dos_file_name */
static
WCHAR
*
get_dos_file_name
(
const
char
*
path
)
{
ULONG
len
=
strlen
(
path
)
+
9
;
/* \??\unix prefix */
WCHAR
*
ret
;
if
(
!
(
ret
=
malloc
(
len
*
sizeof
(
WCHAR
))))
return
NULL
;
if
(
wine_unix_to_nt_file_name
(
path
,
ret
,
&
len
))
{
free
(
ret
);
return
NULL
;
}
if
(
ret
[
5
]
==
':'
)
{
/* get rid of the \??\ prefix */
memmove
(
ret
,
ret
+
4
,
(
len
-
4
)
*
sizeof
(
WCHAR
));
}
else
ret
[
1
]
=
'\\'
;
return
ret
;
}
/**************************************************************************
* import_nsfilenames_to_hdrop
*
...
...
@@ -632,7 +655,7 @@ static void *import_nsfilenames_to_hdrop(CFDataRef data, size_t *ret_size)
WARN
(
"failed to get file-system representation for %s
\n
"
,
debugstr_cf
(
name
));
goto
done
;
}
paths
[
i
]
=
wine_
get_dos_file_name
(
buffer
);
paths
[
i
]
=
get_dos_file_name
(
buffer
);
if
(
!
paths
[
i
])
{
WARN
(
"failed to get DOS path for %s
\n
"
,
debugstr_a
(
buffer
));
...
...
@@ -668,8 +691,7 @@ static void *import_nsfilenames_to_hdrop(CFDataRef data, size_t *ret_size)
done:
if
(
paths
)
{
for
(
i
=
0
;
i
<
count
;
i
++
)
HeapFree
(
GetProcessHeap
(),
0
,
paths
[
i
]);
for
(
i
=
0
;
i
<
count
;
i
++
)
free
(
paths
[
i
]);
HeapFree
(
GetProcessHeap
(),
0
,
paths
);
}
HeapFree
(
GetProcessHeap
(),
0
,
buffer
);
...
...
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