diff --git a/dlls/cabinet/fdi.c b/dlls/cabinet/fdi.c index fdff0bf0f02..758133e2355 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 b5bec38de11..ba622f6b41b 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 */ }