Skip to content

Commit f8fa581

Browse files
committed
zipfn, 7z: fix merged sets w/subdirectories
1 parent 041f921 commit f8fa581

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

src/burner/zipfn.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ INT32 ZipGetList(struct ZipEntry** pList, INT32* pnListCount)
9494

9595
unzGetGlobalInfo(Zip, &ZipGlobalInfo);
9696
INT32 nListLen = ZipGlobalInfo.number_entry;
97+
//bprintf(0, _T("nListLen-zip %d\n"), nListLen);
9798

9899
// Make an array of File Entries
99100
struct ZipEntry* List = (struct ZipEntry *)malloc(nListLen * sizeof(struct ZipEntry));
@@ -126,6 +127,7 @@ INT32 ZipGetList(struct ZipEntry** pList, INT32* pnListCount)
126127
List[nCurrFile].szName = szName;
127128
List[nCurrFile].nLen = FileInfo.uncompressed_size;
128129
List[nCurrFile].nCrc = FileInfo.crc;
130+
//bprintf(0, _T("zip-list: [%S] len %x crc %x\n"), szName, List[nCurrFile].nLen, List[nCurrFile].nCrc);
129131
}
130132

131133
// return the file list
@@ -142,6 +144,7 @@ INT32 ZipGetList(struct ZipEntry** pList, INT32* pnListCount)
142144
size_t tempSize = 0;
143145

144146
INT32 nListLen = _7ZipFile->db.NumFiles;
147+
//bprintf(0, _T("nListLen-7z %d\n"), nListLen);
145148

146149
// Make an array of File Entries
147150
struct ZipEntry* List = (struct ZipEntry *)malloc(nListLen * sizeof(struct ZipEntry));
@@ -151,9 +154,6 @@ INT32 ZipGetList(struct ZipEntry** pList, INT32* pnListCount)
151154
for (UINT32 i = 0; i < _7ZipFile->db.NumFiles; i++) {
152155
size_t len = SzArEx_GetFileNameUtf16(&_7ZipFile->db, i, NULL);
153156

154-
// if it's a directory entry we don't care about it..
155-
if (SzArEx_IsDir(&_7ZipFile->db, i)) continue;
156-
157157
if (len > tempSize) {
158158
SZipFree(NULL, temp);
159159
tempSize = len;
@@ -180,6 +180,7 @@ INT32 ZipGetList(struct ZipEntry** pList, INT32* pnListCount)
180180
szFileName[j + 1] = temp[j] >> 8;
181181
}
182182

183+
//bprintf(0, _T("7z-list: [%S] len %I64x crc %x\n"), szFileName, size, crc);
183184
List[nCurrFile].szName = szFileName;
184185
List[nCurrFile].nLen = size;
185186
List[nCurrFile].nCrc = crc;

0 commit comments

Comments
 (0)