diff --git a/tagstudio/src/core/driver.py b/tagstudio/src/core/driver.py index 1561fbc9..1f7dd4f7 100644 --- a/tagstudio/src/core/driver.py +++ b/tagstudio/src/core/driver.py @@ -16,7 +16,7 @@ class DriverMixin: """Check if the path of library is valid.""" library_path: Path | None = None if open_path: - library_path = Path(open_path) + library_path = Path(open_path).expanduser() if not library_path.exists(): logger.error("Path does not exist.", open_path=open_path) return LibraryStatus(success=False, message="Path does not exist.") diff --git a/tagstudio/src/qt/ts_qt.py b/tagstudio/src/qt/ts_qt.py index 06c136dc..986d7120 100644 --- a/tagstudio/src/qt/ts_qt.py +++ b/tagstudio/src/qt/ts_qt.py @@ -496,7 +496,7 @@ class QtDriver(DriverMixin, QObject): self.init_library_window() self.migration_modal: JsonMigrationModal = None - path_result = self.evaluate_path(self.args.open) + path_result = self.evaluate_path(str(self.args.open).lstrip().rstrip()) # check status of library path evaluating if path_result.success and path_result.library_path: self.splash.showMessage(