Module: wine Branch: master Commit: 67639e6ce7b88894009751b19051c58b7258f952 URL: http://source.winehq.org/git/wine.git/?a=commit;h=67639e6ce7b88894009751b190...
Author: Michael Müller michael@fds-team.de Date: Wed Mar 8 01:07:36 2017 +0100
cabinet: Set index of folder in FDICopy callback.
Signed-off-by: Michael Müller michael@fds-team.de Signed-off-by: Sebastian Lackner sebastian@fds-team.de Signed-off-by: Alexandre Julliard julliard@winehq.org
---
dlls/cabinet/fdi.c | 2 ++ dlls/cabinet/tests/fdi.c | 5 +++-- 2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/dlls/cabinet/fdi.c b/dlls/cabinet/fdi.c index fdff0bf..758133e 100644 --- a/dlls/cabinet/fdi.c +++ b/dlls/cabinet/fdi.c @@ -2640,6 +2640,7 @@ BOOL __cdecl FDICopy( fdin.date = file->date; fdin.time = file->time; fdin.attribs = file->attribs; + fdin.iFolder = file->index; if ((filehf = ((*pfnfdin)(fdintCOPY_FILE, &fdin))) == -1) { set_error( fdi, FDIERROR_USER_ABORT, 0 ); filehf = 0; @@ -2765,6 +2766,7 @@ BOOL __cdecl FDICopy( fdin.date = file->date; fdin.time = file->time; fdin.attribs = file->attribs; /* FIXME: filter _A_EXEC? */ + fdin.iFolder = file->index; ((*pfnfdin)(fdintCLOSE_FILE_INFO, &fdin)); filehf = 0;
diff --git a/dlls/cabinet/tests/fdi.c b/dlls/cabinet/tests/fdi.c index b5bec38..ba622f6 100644 --- a/dlls/cabinet/tests/fdi.c +++ b/dlls/cabinet/tests/fdi.c @@ -116,7 +116,7 @@ static const struct { { {'M','S','C','F'}, 0, 0x59, 0, sizeof(struct CFHEADER) + sizeof(struct CFFOLDER), 0, 3,1, 1, 1, 0, 0x1225, 0x2013 }, { sizeof(struct CFHEADER) + sizeof(struct CFFOLDER) + sizeof(struct CFFILE) + sizeof("file.dat"), 1, tcompTYPE_NONE }, - { sizeof("Hello World!")-1, 0, 0, 0x1225, 0x2013, 0xa114 }, + { sizeof("Hello World!")-1, 0, 0x1234, 0x1225, 0x2013, 0xa114 }, { 'f','i','l','e','.','d','a','t',0 }, { 0, sizeof("Hello World!")-1, sizeof("Hello World!")-1 }, { 'H','e','l','l','o',' ','W','o','r','l','d','!' } @@ -841,7 +841,7 @@ static INT_PTR CDECL fdi_mem_notify(FDINOTIFICATIONTYPE fdint, FDINOTIFICATION * ok(info->date == 0x1225, "expected 0x1225, got %#x\n", info->date); ok(info->time == 0x2013, "expected 0x2013, got %#x\n", info->time); ok(info->attribs == 0xa114, "expected 0xa114, got %#x\n", info->attribs); - ok(info->iFolder == 0, "expected 0, got %#x\n", info->iFolder); + ok(info->iFolder == 0x1234, "expected 0x1234, got %#x\n", info->iFolder); return 1;
case fdintCOPY_FILE: @@ -850,6 +850,7 @@ static INT_PTR CDECL fdi_mem_notify(FDINOTIFICATIONTYPE fdint, FDINOTIFICATION *
ok(info->cb == 12, "expected 12, got %u\n", info->cb); ok(!strcmp(info->psz1, expected), "expected %s, got %s\n", expected, info->psz1); + ok(info->iFolder == 0x1234, "expected 0x1234, got %#x\n", info->iFolder); return 0x12345678; /* call write() callback */ }