From 8f2b621ce521ba317de68ae8e86991d099d22c47 Mon Sep 17 00:00:00 2001 From: Joel Collins Date: Tue, 25 Jun 2019 18:03:26 +0100 Subject: [PATCH] Fixed automatic filename generation --- openflexure_microscope/camera/capture.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/openflexure_microscope/camera/capture.py b/openflexure_microscope/camera/capture.py index 46aa7acf..ea789088 100644 --- a/openflexure_microscope/camera/capture.py +++ b/openflexure_microscope/camera/capture.py @@ -203,8 +203,12 @@ class CaptureObject(object): Construct a full file path, based on filename, folder, and file format. Defaults to UUID. """ - global TEMP_CAPTURE_PATH - return os.path.join(self.folder, self.filename) # Full file name by joining given folder to given name + global TEMP_CAPTURE_PATH, BASE_CAPTURE_PATH + if self.temporary: + base_dir = TEMP_CAPTURE_PATH + else: + base_dir = BASE_CAPTURE_PATH + return os.path.join(base_dir, self.filename) # Full file name by joining given folder to given name def split_file_path(self, filepath): """