From 2d89df620e9b79fbf04ec8261235b36c536e48d2 Mon Sep 17 00:00:00 2001 From: Andrew Arneson Date: Sun, 2 Jun 2024 22:43:10 -0600 Subject: [PATCH] Fix Open Library Dialog Resolve issues where the open library dialog will try to open `.` if no path is returned from the dialog --- tagstudio/src/qt/ts_qt.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/tagstudio/src/qt/ts_qt.py b/tagstudio/src/qt/ts_qt.py index a4d8f2f2..07e2de62 100644 --- a/tagstudio/src/qt/ts_qt.py +++ b/tagstudio/src/qt/ts_qt.py @@ -223,13 +223,11 @@ class QtDriver(QObject): thread.start() def open_library_from_dialog(self): - dir = Path( - QFileDialog.getExistingDirectory( - None, "Open/Create Library", "/", QFileDialog.ShowDirsOnly - ) + dir = QFileDialog.getExistingDirectory( + None, "Open/Create Library", "/", QFileDialog.ShowDirsOnly ) if dir not in (None, ""): - self.open_library(dir) + self.open_library(Path(dir)) def signal_handler(self, sig, frame): if sig in (SIGINT, SIGTERM, SIGQUIT):