Skip to content

Commit

Permalink
Don't add "fact_extracted" prefix
Browse files Browse the repository at this point in the history
To me it does not make sense why the prefix as added at all.
Also how would you distinguish between a tar that contains only one
directory "fact_extracted"?
  • Loading branch information
maringuu authored and jstucke committed Oct 12, 2023
1 parent ed65a74 commit 376340d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion fact_extractor/plugins/unpacking/squashFS/code/squash_fs.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,10 @@ def unpack_function(file_path, tmp_dir):
'''
unpack_result = {}
for unpacker, parameter in SQUASH_UNPACKER:
output = execute_shell_command(f'fakeroot {unpacker} {parameter} -d {tmp_dir}/fact_extracted {file_path}')
# We need to force here since "-dest" does not allow existing directories
output = execute_shell_command(
f"fakeroot {unpacker} {parameter} -dest {tmp_dir} -force {file_path}",
)
if _unpack_success(tmp_dir):
unpack_result['unpacking_tool'] = unpacker.name
unpack_result['output'] = output
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,5 @@ def test_unpacker_selection_generic(self):

def test_extraction_sqfs(self):
self.check_unpacking_of_standard_unpack_set(
TEST_DATA_DIR / 'sqfs.img', additional_prefix_folder='fact_extracted'
TEST_DATA_DIR / 'sqfs.img',
)

0 comments on commit 376340d

Please sign in to comment.