From 4c9d55859d3b6b04bf15fa512fd40c1d3ce41827 Mon Sep 17 00:00:00 2001 From: Mirko Lenz Date: Wed, 8 Feb 2023 11:30:16 +0100 Subject: [PATCH] fix: only add resource if text is a different file --- arguebuf/load/_load_path.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arguebuf/load/_load_path.py b/arguebuf/load/_load_path.py index a1f226f..88e8045 100644 --- a/arguebuf/load/_load_path.py +++ b/arguebuf/load/_load_path.py @@ -29,7 +29,7 @@ def load_file( elif isinstance(text_file, str): text_file = Path(text_file) - if text_file.exists(): + if text_file.exists() and text_file != file: text = text_file.read_text() graph.add_resource(Resource(text))