diff --git a/buildingspy/development/merger.py b/buildingspy/development/merger.py index c023d6d2..f4d9c3ec 100755 --- a/buildingspy/development/merger.py +++ b/buildingspy/development/merger.py @@ -47,7 +47,7 @@ def isValidLibrary(lib_home): # -------------------------- # Class variables - self._src_library_name = "Annex60" + self._src_library_name = os.path.basename(annex60_dir) self._annex60_home=annex60_dir self._target_home=dest_dir # Library name, such as Buildings @@ -207,10 +207,8 @@ def merge(self): if desFil.endswith(".mo") or desFil.endswith(".mos"): copiedFiles.append(desFil) self._copy_mo_and_mos(srcFil, desFil) - # Only copy reference results if no such file exists. - # If a reference file already exists, then don't change it. - # This requires to replace - # the name of the library in names of the result file + # Only copy reference results if it corresponds + # to a package that is not excluded elif desFil.startswith(ref_res): dir_name = os.path.dirname(desFil) base_name = os.path.basename(desFil) @@ -224,9 +222,8 @@ def merge(self): new_file = os.path.join(dir_name, base_name.replace(self._src_library_name, self._new_library_name)) - if not os.path.isfile(new_file): - copiedFiles.append(new_file) - shutil.copy2(srcFil, new_file) + copiedFiles.append(new_file) + shutil.copy2(srcFil, new_file) # Copy all other files. This may be images, C-source, libraries etc. else: