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
968a4457
Commit
968a4457
authored
Aug 07, 2006
by
Mike McCormack
Committed by
Alexandre Julliard
Aug 07, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cabinet: Split the cabinet path for FDICopy.
parent
9d9ae2e5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
2 deletions
+24
-2
cabinet_main.c
dlls/cabinet/cabinet_main.c
+24
-2
No files found.
dlls/cabinet/cabinet_main.c
View file @
968a4457
...
@@ -303,7 +303,7 @@ HRESULT WINAPI Extract(EXTRACTdest *dest, LPCSTR szCabName)
...
@@ -303,7 +303,7 @@ HRESULT WINAPI Extract(EXTRACTdest *dest, LPCSTR szCabName)
HRESULT
res
=
S_OK
;
HRESULT
res
=
S_OK
;
HFDI
hfdi
;
HFDI
hfdi
;
ERF
erf
;
ERF
erf
;
static
CHAR
empty
[]
=
""
;
char
*
str
,
*
path
,
*
name
;
TRACE
(
"(%p, %s)
\n
"
,
dest
,
szCabName
);
TRACE
(
"(%p, %s)
\n
"
,
dest
,
szCabName
);
...
@@ -323,10 +323,32 @@ HRESULT WINAPI Extract(EXTRACTdest *dest, LPCSTR szCabName)
...
@@ -323,10 +323,32 @@ HRESULT WINAPI Extract(EXTRACTdest *dest, LPCSTR szCabName)
if
(
GetFileAttributesA
(
dest
->
directory
)
==
INVALID_FILE_ATTRIBUTES
)
if
(
GetFileAttributesA
(
dest
->
directory
)
==
INVALID_FILE_ATTRIBUTES
)
return
S_OK
;
return
S_OK
;
if
(
!
FDICopy
(
hfdi
,
(
LPSTR
)
szCabName
,
empty
,
0
,
/* split the cabinet name into path + name */
str
=
HeapAlloc
(
GetProcessHeap
(),
0
,
lstrlenA
(
szCabName
)
+
1
);
if
(
!
str
)
{
res
=
E_OUTOFMEMORY
;
goto
end
;
}
lstrcpyA
(
str
,
szCabName
);
path
=
str
;
name
=
strrchr
(
path
,
'\\'
);
if
(
name
)
*
name
++
=
0
;
else
{
name
=
path
;
path
=
NULL
;
}
if
(
!
FDICopy
(
hfdi
,
name
,
path
,
0
,
fdi_notify_extract
,
NULL
,
dest
))
fdi_notify_extract
,
NULL
,
dest
))
res
=
E_FAIL
;
res
=
E_FAIL
;
HeapFree
(
GetProcessHeap
(),
0
,
str
);
end:
FDIDestroy
(
hfdi
);
FDIDestroy
(
hfdi
);
return
res
;
return
res
;
...
...
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