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
7925c9b0
Commit
7925c9b0
authored
Apr 11, 2013
by
Sergey Guralnik
Committed by
Alexandre Julliard
Apr 11, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
extrac32: Create directory for extracted file if need.
parent
56c1a8b0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
0 deletions
+19
-0
extrac32.c
programs/extrac32/extrac32.c
+19
-0
No files found.
programs/extrac32/extrac32.c
View file @
7925c9b0
...
...
@@ -23,6 +23,7 @@
#include <shellapi.h>
#include <setupapi.h>
#include <shlwapi.h>
#include <shlobj.h>
#include "wine/unicode.h"
#include "wine/debug.h"
...
...
@@ -31,6 +32,21 @@ WINE_DEFAULT_DEBUG_CHANNEL(extrac32);
static
BOOL
force_mode
;
static
void
create_target_directory
(
LPWSTR
Target
)
{
WCHAR
dir
[
MAX_PATH
];
int
res
;
strcpyW
(
dir
,
Target
);
*
PathFindFileNameW
(
dir
)
=
0
;
/* Truncate file name */
if
(
!
PathIsDirectoryW
(
dir
))
{
res
=
SHCreateDirectoryExW
(
NULL
,
dir
,
NULL
);
if
(
res
!=
ERROR_SUCCESS
&&
res
!=
ERROR_ALREADY_EXISTS
)
WINE_ERR
(
"Can't create directory: %s
\n
"
,
wine_dbgstr_w
(
dir
));
}
}
static
UINT
WINAPI
ExtCabCallback
(
PVOID
Context
,
UINT
Notification
,
UINT_PTR
Param1
,
UINT_PTR
Param2
)
{
FILE_IN_CABINET_INFO_W
*
pInfo
;
...
...
@@ -42,6 +58,9 @@ static UINT WINAPI ExtCabCallback(PVOID Context, UINT Notification, UINT_PTR Par
pInfo
=
(
FILE_IN_CABINET_INFO_W
*
)
Param1
;
lstrcpyW
(
pInfo
->
FullTargetName
,
(
LPCWSTR
)
Context
);
lstrcatW
(
pInfo
->
FullTargetName
,
pInfo
->
NameInCabinet
);
/* SetupIterateCabinet() doesn't create full path to target by itself,
so we should do it manually */
create_target_directory
(
pInfo
->
FullTargetName
);
return
FILEOP_DOIT
;
case
SPFILENOTIFY_FILEEXTRACTED
:
pFilePaths
=
(
FILEPATHS_W
*
)
Param1
;
...
...
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