From ffa76d0f28d9c6dc38e767ad5639b5b47f58fd8d Mon Sep 17 00:00:00 2001 From: Pekka T Savolainen Date: Fri, 20 Dec 2024 16:57:26 +0200 Subject: [PATCH] Fix an esoteric bug - Open project directory action tried to open a .bat file if the project folder name matched a .bat file name --- spinetoolbox/helpers.py | 2 +- spinetoolbox/ui_main.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/spinetoolbox/helpers.py b/spinetoolbox/helpers.py index de95e076a..0e53fe092 100644 --- a/spinetoolbox/helpers.py +++ b/spinetoolbox/helpers.py @@ -241,7 +241,7 @@ def open_url(url): Returns: bool: True if successful, False otherwise """ - return QDesktopServices.openUrl(QUrl(url, QUrl.TolerantMode)) + return QDesktopServices.openUrl(QUrl(url, QUrl.ParsingMode.TolerantMode)) def set_taskbar_icon(): diff --git a/spinetoolbox/ui_main.py b/spinetoolbox/ui_main.py index 3519e56e9..bff0761c2 100644 --- a/spinetoolbox/ui_main.py +++ b/spinetoolbox/ui_main.py @@ -2241,7 +2241,7 @@ def _open_project_directory(self, _): if self._project is None: self.msg.emit("Please open or create a project first") return - open_url("file:///" + self._project.project_dir) + open_url("file:///" + self._project.project_dir + "/") @Slot(bool) def _open_project_item_directory(self, _):