Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using find to limit zip command line smaller #493

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions dax/XnatUtils.py
Original file line number Diff line number Diff line change
Expand Up @@ -1203,7 +1203,7 @@ def list_project_assessors(self, projectid):
anew['inputs'] = asse.get('%s/inputs' % pfix)
anew['dax_docker_version'] = asse['%s/dax_docker_version' % pfix]
anew['dax_version'] = asse['%s/dax_version' % pfix]
anew['dax_version_hash'] = asse['%s/dax_version_hash' % pfix]
anew['dax_version_hash'] = asse['%s/dax_version_hash' % pfix]
assessors_dict[key] = anew

return sorted(list(assessors_dict.values()), key=lambda k: k['label'])
Expand Down Expand Up @@ -1961,7 +1961,8 @@ def upload_folder_to_obj(directory, resource_obj, resource_label, remove=False,

# Zip all the files in the directory
os.chdir(directory)
os.system('zip -r %s * > /dev/null' % fzip)
os.system('find . -type f -print | zip %s -@' %fzip)
#os.system('zip -r %s * > /dev/null' % fzip)
# upload
resource_obj.put_zip(os.path.join(directory, fzip), overwrite=True,
extract=extract)
Expand Down Expand Up @@ -2338,7 +2339,7 @@ def full_object(self):
self.project, self.subject, self.session)
return self.full_object_

def creation_timestamp(self):
def creation_timestamp(self):
if self.creation_timestamp_ is None:
self.creation_timestamp_ = self.full_object().attrs.get(
self.datatype() + '/meta/insert_date')
Expand Down