From 32ad6a34fd7892e02070c95d199a0108b7afd52f Mon Sep 17 00:00:00 2001 From: matterhorn103 <83813148+matterhorn103@users.noreply.github.com> Date: Tue, 11 Jun 2024 17:11:47 +0200 Subject: [PATCH] Make update path specification relative so it works cross-platform --- config.toml | 2 +- mora_the_explorer/explorer.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/config.toml b/config.toml index 424c30b..54f097d 100644 --- a/config.toml +++ b/config.toml @@ -25,7 +25,7 @@ repeat_delay = 5 [paths] -update = "//mora/nmr/mnova/mora_the_explorer" +update = "mnova/mora_the_explorer" Windows = "//mora/nmr" Darwin = "/Volumes/nmr" # Darwin = macOS Linux = "will be overwritten" # Specify in user config, not here! diff --git a/mora_the_explorer/explorer.py b/mora_the_explorer/explorer.py index e7ce1ce..b284601 100644 --- a/mora_the_explorer/explorer.py +++ b/mora_the_explorer/explorer.py @@ -36,7 +36,7 @@ def __init__( # Set path to mora self.mora_path = Path(config.paths[platform.system()]) - self.update_path = Path(config.paths["update"]) + self.update_path = self.mora_path / config.paths["update"] # Load group and spectrometer info # Need to flatten groups dict (as some are in an "other" subdict) @@ -45,7 +45,7 @@ def __init__( self.specs = config.specs # Check for updates - self.update_check(Path(config.paths["update"])) + self.update_check(self.update_path) # Timer for repeat check, starts checking function when timer runs out self.timer = QTimer()