From 79068b7e303d0a8dcefe5575aca069e7dc324c57 Mon Sep 17 00:00:00 2001 From: karthikmasi Date: Thu, 17 Oct 2024 12:41:28 -0500 Subject: [PATCH] Using find to limit zip command line smaller --- dax/XnatUtils.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/dax/XnatUtils.py b/dax/XnatUtils.py index 1a5753c1..315e8187 100644 --- a/dax/XnatUtils.py +++ b/dax/XnatUtils.py @@ -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']) @@ -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) @@ -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')