Fix Open Library Dialog

Resolve issues where the open library dialog will try to open `.` if no path is returned from the dialog
This commit is contained in:
Andrew Arneson
2024-06-02 22:43:10 -06:00
parent 868b553670
commit 2d89df620e

View File

@@ -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):