From cee73ed85da4226a9415d560bcad954e4466d0f4 Mon Sep 17 00:00:00 2001 From: Alfredo Dal'Ava Junior Date: Fri, 28 Apr 2023 17:53:38 -0300 Subject: [PATCH] fix archived config file name when using non default file When RMS is started with "--config XX0001.config", the data folder in CapturedFiles will contain a copy with it using name ".config". However the config file in ArchivedFiles will use the original name. This makes a copy of it with ".config" and copies it to the archive. --- RMS/Reprocess.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/RMS/Reprocess.py b/RMS/Reprocess.py index 6615418a9..27911d3ba 100644 --- a/RMS/Reprocess.py +++ b/RMS/Reprocess.py @@ -10,6 +10,7 @@ import argparse import logging import random +import shutil from RMS.ArchiveDetections import archiveDetections, archiveFieldsums # from RMS.Astrometry.ApplyAstrometry import applyAstrometryFTPdetectinfo @@ -373,7 +374,10 @@ def processNight(night_data_dir, config, detection_results=None, nodetect=False) ### Add extra files to archive # Add the config file to the archive too - extra_files.append(config.config_file_name) + config_file_copy = os.path.join(night_data_dir, ".config") + shutil.copy2(config.config_file_name, config_file_copy) + extra_files.append(config_file_copy) + # Add the mask if (not nodetect):