File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed
packages/service-library/src/servicelib/archiving_utils Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -138,11 +138,14 @@ async def archive_dir(
138138 destination : Path ,
139139 * ,
140140 compress : bool ,
141- store_relative_path : bool ,
142- exclude_patterns : set [str ] | None = None ,
141+ store_relative_path : bool , # always set to True # TODO : remove at the end not used
142+ exclude_patterns : set [str ] | None = None , # TODO : remove at the end not used
143143 progress_bar : ProgressBarData | None = None ,
144144) -> None :
145- command = f"7z a -tzip -bsp1 { destination } { dir_to_compress } "
145+ assert store_relative_path is True # nosec
146+
147+ compression_option = "-mx=0" if compress else ""
148+ command = f"7z a -tzip -bsp1 { compression_option } { destination } { dir_to_compress } "
146149
147150 async def progress_handler (byte_progress : NonNegativeInt ) -> None :
148151 print (f"{ byte_progress = } " )
@@ -161,7 +164,7 @@ async def unarchive_dir(
161164 archive_to_extract : Path ,
162165 destination_folder : Path ,
163166 * ,
164- max_workers : int = 0 ,
167+ max_workers : int = 0 , # TODO: remove at the end not used
165168 progress_bar : ProgressBarData | None = None ,
166169 log_cb : Callable [[str ], Awaitable [None ]] | None = None ,
167170) -> set [Path ]:
You can’t perform that action at this time.
0 commit comments