mirror of
https://github.com/TagStudioDev/TagStudio.git
synced 2026-01-29 06:10:51 +00:00
fix: strip whitespace around --open/-o flag (#670)
* fix: fix -o flag not working if path has whitespace around it * fix: change strip to lstrip/rstrip * fix: manually expand "~"
This commit is contained in:
@@ -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.")
|
||||
|
||||
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user