Skip to content

Commit

Permalink
Fix Open Library Dialog
Browse files Browse the repository at this point in the history
Resolve issues where the open library dialog will try to open `.` if no path is returned from the dialog
  • Loading branch information
Andrew Arneson authored and Andrew Arneson committed Jun 3, 2024
1 parent 868b553 commit 2d89df6
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions tagstudio/src/qt/ts_qt.py
Original file line number Diff line number Diff line change
Expand Up @@ -223,13 +223,11 @@ def __init__(self, core: TagStudioCore, args):
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):
Expand Down

0 comments on commit 2d89df6

Please sign in to comment.