more work for regeneration of xml file on aggregation rename
@@ -266,14 +266,19 @@ class CompositeResource(BaseResource):
# action is needed
pass
+ # we have to delete old _meta.xml file if it exits
# first check if the orig_aggr_name is a folder path or file path
name, ext = os.path.splitext(orig_aggr_name)
is_orig_folder = ext == ''
- if not is_orig_folder:
+ meta_xml_file_full_path = ''
istorage = self.get_irods_storage()
- # we have to delete old _meta.xml file if exits
meta_xml_file_name = orig_aggr_name + "_meta.xml"
+ if not is_orig_folder:
meta_xml_file_full_path = os.path.join(self.file_path, meta_xml_file_name)
+ elif is_new_folder:
+ meta_xml_file_full_path = os.path.join(self.file_path, new_aggr_name,
+ meta_xml_file_name)
+
if istorage.exists(meta_xml_file_full_path):
istorage.delete(meta_xml_file_full_path)
