[Wine-devel] Eter's patch is applied to winehq repo 04/11/13
builder-robot на etersoft.ru
builder-robot на etersoft.ru
Чт Апр 11 22:40:31 MSK 2013
New Etersoft's patches since last build time:
commit 80bc3838a73aa057624880758d81e476a58e1c88
Author: Sergey Guralnik <serhio на etersoft.ru>
extrac32: Avoid appending redundant backslash to path end.
commit 7925c9b0287e1fe28108afe879d454b18681369b
Author: Sergey Guralnik <serhio на etersoft.ru>
extrac32: Create directory for extracted file if need.
---
commit 80bc3838a73aa057624880758d81e476a58e1c88
Author: Sergey Guralnik <serhio на etersoft.ru>
Date: Thu Apr 11 10:54:02 2013 +0300
extrac32: Avoid appending redundant backslash to path end.
diff --git a/programs/extrac32/extrac32.c b/programs/extrac32/extrac32.c
index 644f885..2126c04 100644
--- a/programs/extrac32/extrac32.c
+++ b/programs/extrac32/extrac32.c
@@ -200,7 +200,6 @@ int PASCAL wWinMain(HINSTANCE hInstance, HINSTANCE prev, LPWSTR cmdline, int sho
int i;
WCHAR check, cmd = 0;
WCHAR path[MAX_PATH];
- WCHAR backslash[] = {'\\',0};
LPCWSTR cabfile = NULL;
path[0] = 0;
@@ -273,7 +272,7 @@ int PASCAL wWinMain(HINSTANCE hInstance, HINSTANCE prev, LPWSTR cmdline, int sho
if (cmd == 'E' && !path[0])
GetCurrentDirectoryW(MAX_PATH, path);
- lstrcatW(path, backslash);
+ PathAddBackslashW(path);
/* Execute the specified command */
switch(cmd)
commit 7925c9b0287e1fe28108afe879d454b18681369b
Author: Sergey Guralnik <serhio на etersoft.ru>
Date: Thu Apr 11 10:45:58 2013 +0300
extrac32: Create directory for extracted file if need.
diff --git a/programs/extrac32/extrac32.c b/programs/extrac32/extrac32.c
index 111d2a7..644f885 100644
--- a/programs/extrac32/extrac32.c
+++ b/programs/extrac32/extrac32.c
@@ -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;
Подробная информация о списке рассылки Wine-devel