always overwrite
@@ -952,11 +952,6 @@ def unzip_file(user, res_id, zip_with_rel_path, bool_remove_original, overwrite=
unzip_path = None
try:
- if overwrite:
- # irods doesn't allow overwrite, so we have to check if a file exists, delete it and
- # then write the new file. Aggregations are treated as single objects. If one file is
- # overwritten in an aggregation, the whole aggregation is deleted.
-
# unzip to a temporary folder
unzip_path = istorage.unzip(zip_with_full_path, unzipped_folder=uuid4().hex)
# list all files to be moved into the resource
@@ -1000,9 +995,6 @@ def unzip_file(user, res_id, zip_with_rel_path, bool_remove_original, overwrite=
from hs_file_types.utils import ingest_metadata_files
ingest_metadata_files(resource, meta_files)
istorage.delete(unzip_path)
- else:
- unzip_path = istorage.unzip(zip_with_full_path)
- link_irods_folder_to_django(resource, istorage, unzip_path)
except Exception:
logger.exception("failed to unzip")
