Skip to content

Commit

Permalink
Merge pull request #81 from frheault/minor_fixes_zip_info_extra
Browse files Browse the repository at this point in the history
Bug when building the zipfile using CLIs (zip, jar, etc)
  • Loading branch information
arokem authored May 3, 2024
2 parents 86bf5a9 + f22ce22 commit 30dd0f4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions scripts/tests/test_workflows.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,17 +29,17 @@


def test_help_option_convert_dsi(script_runner):
ret = script_runner.run(['tff_convert_dsi_studio.py', '--help'])
ret = script_runner.run('tff_convert_dsi_studio.py', '--help')
assert ret.success


def test_help_option_convert(script_runner):
ret = script_runner.run(['tff_convert_tractogram.py', '--help'])
ret = script_runner.run('tff_convert_tractogram.py', '--help')
assert ret.success


def test_help_option_generate_trx_from_scratch(script_runner):
ret = script_runner.run(['tff_generate_trx_from_scratch.py', '--help'])
ret = script_runner.run('tff_generate_trx_from_scratch.py', '--help')
assert ret.success


Expand Down
4 changes: 2 additions & 2 deletions trx/trx_file_memmap.py
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ def load(input_obj: str, check_dpg: bool = True) -> Type["TrxFile"]:
trx = load_from_directory(tmp_dir.name)
trx._uncompressed_folder_handle = tmp_dir
logging.info(
"File was compressed, call the close() function before"
"File was compressed, call the close() function before "
"exiting."
)
else:
Expand Down Expand Up @@ -293,7 +293,7 @@ def load_from_zip(filename: str) -> Type["TrxFile"]:
size = zip_info.file_size / dtype_size

if len(zip_info.extra):
mem_adress += 4
mem_adress -= len(zip_info.extra)

if size.is_integer():
files_pointer_size[elem_filename] = mem_adress, int(size)
Expand Down

0 comments on commit 30dd0f4

Please sign in to comment.