From 79d1ce93b737d0950ce720c904d96f938e810277 Mon Sep 17 00:00:00 2001 From: Fuhrmann Date: Wed, 22 Apr 2020 21:48:38 -0300 Subject: [PATCH] Fix bug when reading from the settings --- README.md | 3 +++ src/sharex.py | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 5e18d37..965d5a8 100644 --- a/README.md +++ b/README.md @@ -447,6 +447,9 @@ To execute your customized workflows select "Custom workflow" action, press TAB ## Change Log +### v1.0.2 +* Fix bug when reading from settings + ### v1.0.1 * Added plugin's icon diff --git a/src/sharex.py b/src/sharex.py index cce1a46..eb2df81 100644 --- a/src/sharex.py +++ b/src/sharex.py @@ -95,12 +95,12 @@ def on_events(self, flags): # Read the configuration file and set some variables def read_config(self): settings = self.load_settings() - self.sharex_path = settings.get("path", section="main", fallback=self.DEFAULT_SHAREX_PATH) + self.sharex_path = settings.get_stripped("path", section="main", fallback=self.DEFAULT_SHAREX_PATH) if not self.file_exists("{}\{}".format(self.sharex_path, self.SHAREX_EXE)): self.err("Could not find ShareX executable in the provided path: ", self.sharex_path) - self.sharex_userpath = settings.get("user_path", section="main", fallback=self.DEFAULT_SHAREXUSER_PATH) + self.sharex_userpath = settings.get_stripped("user_path", section="main", fallback=self.DEFAULT_SHAREXUSER_PATH) # Initialize all the possible suggestions the user can select def initialize_suggestions(self):