From 230e586235cbd34e6635ee5ce59ad14fe2ff7255 Mon Sep 17 00:00:00 2001 From: Tobias Reiher Date: Mon, 21 Aug 2023 18:56:34 +0200 Subject: [PATCH] Fix GNAT Studio plugin --- ide/gnatstudio/recordflux.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/ide/gnatstudio/recordflux.py b/ide/gnatstudio/recordflux.py index 799472a17..a881fc51e 100644 --- a/ide/gnatstudio/recordflux.py +++ b/ide/gnatstudio/recordflux.py @@ -323,10 +323,11 @@ def output_dir(): assert output_dir, "Output directory not configured" create_missing = GPS.Project.root().get_attribute_as_string("Create_Missing_Dirs") if create_missing and create_missing.lower() == "true": - if Path.exists(output_dir): - assert Path.is_dir(output_dir) + output_path = Path(output_dir) + if output_path.exists(): + assert output_path.is_dir() else: - Path.mkdir(output_dir, parents=True) + output_path.mkdir(parents=True) return output_dir @@ -360,7 +361,7 @@ def get_message_name(locations, name, line, column): def display_message_graph(filename): - with (output_dir() + "/locations.json").open() as f: + with (Path(output_dir()) / "locations.json").open() as f: locations = json.load(f) loc = GPS.EditorBuffer.get().current_view().cursor() column = loc.column()