-
Notifications
You must be signed in to change notification settings - Fork 90
Closed
Labels
bugSomething isn't workingSomething isn't workinghelp wantedExtra attention is neededExtra attention is neededpythonPull requests that update Python codePull requests that update Python code
Description
When extracting chunks, there is a logic for handling the whole chunks differently, here. This results that in some cases some directories are not reported.
Reproduce this with this test file: test.zip. This is actually from the integration test suit, but I had to zip it for github to allow me attach it.
If I run this file with unblob and check the report, I get the following item:
A part of the generated report json
{
"task": {
"path": "/tmp/fruits.lvl1.lzh",
"depth": 0,
"chunk_id": "",
"__typename__": "Task"
},
"reports": [
{
"path": "/tmp/fruits.lvl1.lzh",
"size": 146,
"is_dir": false,
"is_file": true,
"is_link": false,
"link_target": null,
"__typename__": "StatReport"
},
{
"magic": " LHarc 1.x/ARX archive data [lh0], 0x0 OS, with \"apple.txt\"\\012- data",
"mime_type": "application/x-lzh-compressed",
"__typename__": "FileMagicReport"
},
{
"md5": "cf71709694cd2f3e98fcf87524194beb",
"sha1": "701248bfd7dd7a7360ce237754a82425d1d13346",
"sha256": "e016f42094b088058e7fa5d9c3f98bafaeac87899205192d95b8001f72058a0f",
"__typename__": "HashReport"
},
{
"chunk_id": "47941:3",
"handler_name": "lzh",
"start_offset": 96,
"end_offset": 146,
"size": 50,
"is_encrypted": false,
"extraction_reports": [],
"__typename__": "ChunkReport"
},
{
"chunk_id": "47941:2",
"handler_name": "lzh",
"start_offset": 47,
"end_offset": 96,
"size": 49,
"is_encrypted": false,
"extraction_reports": [],
"__typename__": "ChunkReport"
},
{
"chunk_id": "47941:1",
"handler_name": "lzh",
"start_offset": 0,
"end_offset": 47,
"size": 47,
"is_encrypted": false,
"extraction_reports": [],
"__typename__": "ChunkReport"
}
],
"subtasks": [
{
"path": "/tmp/unblob/fruits.lvl1.lzh_extract/96-146.lzh_extract",
"depth": 1,
"chunk_id": "47941:3",
"__typename__": "Task"
},
{
"path": "/tmp/unblob/fruits.lvl1.lzh_extract/47-96.lzh_extract",
"depth": 1,
"chunk_id": "47941:2",
"__typename__": "Task"
},
{
"path": "/tmp/unblob/fruits.lvl1.lzh_extract/0-47.lzh_extract",
"depth": 1,
"chunk_id": "47941:1",
"__typename__": "Task"
}
],
"__typename__": "TaskResult"
}This means, when unblob handles /tmp/fruits.lvl1.lzh, it will create 3 subtasks:
/tmp/unblob/fruits.lvl1.lzh_extract/96-146.lzh_extract/tmp/unblob/fruits.lvl1.lzh_extract/47-96.lzh_extract/tmp/unblob/fruits.lvl1.lzh_extract/0-47.lzh_extract
And will continue to run for those (sub)tasks. However a task for the /tmp/unblob/fruits.lvl1.lzh_extract directory is never created, so that directory is just there in the file system without actually being in the generated report.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workinghelp wantedExtra attention is neededExtra attention is neededpythonPull requests that update Python codePull requests that update Python code