[#2833] unzip resource files to a folder#2842
Merged
sblack-usu merged 5 commits into2502-composite-resource-phase-2from Jul 25, 2018
Merged
[#2833] unzip resource files to a folder#2842sblack-usu merged 5 commits into2502-composite-resource-phase-2from
sblack-usu merged 5 commits into2502-composite-resource-phase-2from
Conversation
Contributor
Author
|
Depends on hydroshare/django_irods#44 |
pkdash
reviewed
Jul 19, 2018
hs_core/views/utils.py
Outdated
| zip_fname = os.path.basename(zip_with_rel_path) | ||
| istorage.session.run("ibun", None, '-xDzip', zip_with_full_path, unzip_path) | ||
| unzip_path = istorage.unzip(zip_with_full_path) | ||
| link_irods_folder_to_django(resource, istorage, unzip_path, (zip_fname,)) |
Member
There was a problem hiding this comment.
If we are crating a new folder always as part of unzip, then no need to pass zip_fname to be excluded from linking.
Contributor
Author
There was a problem hiding this comment.
nice catch, I've removed it.
pkdash
reviewed
Jul 20, 2018
| # there should not be any resource files ending with _meta.xml or _resmap.xml | ||
| for res_file in self.composite_resource.files.all(): | ||
| self.assertFalse(res_file.file_name.endswith('_mata.xml')) | ||
| self.assertFalse(res_file.file_name.endswith('_resmap.xml')) |
Member
There was a problem hiding this comment.
I think it needs to be inside the for loop
Contributor
|
@sblack-usu Are we looking to get this merged into 1.16? |
Contributor
Author
|
yeah, it'll go in the composite resource phase 2 first... it's a solution to a bug that we found when unzipping at the aggregation level. |
Contributor
Author
|
@pkdash - Is this good to merge into the composite resource branch now? |
pkdash
approved these changes
Jul 25, 2018
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull Request Checklist:
Positive Test Case