From 60554ba86d9dfec5b4ec239c1ecf8b5f1e628c5b Mon Sep 17 00:00:00 2001 From: Mathis Hocke <mathis.hocke@fu-berlin.de> Date: Wed, 7 May 2025 13:42:28 +0200 Subject: [PATCH] Automatically add .mp4 extension to video path --- src/robofish/io/file.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/robofish/io/file.py b/src/robofish/io/file.py index 94ce119..434b3d3 100644 --- a/src/robofish/io/file.py +++ b/src/robofish/io/file.py @@ -1471,6 +1471,8 @@ class File(h5py.File): ) if video_path is not None: + if not video_path.suffix: + video_path = video_path.parent / f"{video_path.stem}.mp4" if video_path.exists(): if input(f"Video {str(video_path)} exists. Overwrite? (y/n)") == "y": video_path.unlink() -- GitLab