diff --git a/seismo_lab.py b/seismo_lab.py index c1fbd3d..dc96d59 100644 --- a/seismo_lab.py +++ b/seismo_lab.py @@ -479,8 +479,10 @@ class BridgePanel(tk.Frame): logdir = self.logdir_var.get().strip() or "." os.makedirs(logdir, exist_ok=True) ts = datetime.datetime.now().strftime("%Y%m%d_%H%M%S") - bw_path = os.path.join(logdir, f"raw_bw_{ts}.bin") - s3_path = os.path.join(logdir, f"raw_s3_{ts}.bin") + safe_label = self._cap_label.replace(" ", "_") if self._cap_label else "" + suffix = f"_{safe_label}" if safe_label else "" + bw_path = os.path.join(logdir, f"raw_bw_{ts}{suffix}.bin") + s3_path = os.path.join(logdir, f"raw_s3_{ts}{suffix}.bin") with self._tcp_cap_lock: self._tcp_cap_bw_fh = open(bw_path, "wb") self._tcp_cap_s3_fh = open(s3_path, "wb")