From 89dbdbdccc37d885035fe79f2b4fe95235793dfd Mon Sep 17 00:00:00 2001 From: Philipp Maier Date: Wed, 21 Aug 2024 11:43:00 +0200 Subject: [PATCH] runtime: fix get_file_by_name The method get_file_by_name compares the selectable directly with the given file name. This is not correct. The comparison should be with the path element from the pathlist. Related: OS#6092 Change-Id: Id2d0704678935d9b9e2f1aeb6eaccbff6fa9d429 --- pySim/runtime.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pySim/runtime.py b/pySim/runtime.py index 5ffbee62..a813e6de 100644 --- a/pySim/runtime.py +++ b/pySim/runtime.py @@ -256,11 +256,11 @@ class RuntimeLchan: for p in pathlist: # Look for the next file in the path list - selectables = file.get_selectables().items() + selectables = file.get_selectables() file = None for selectable in selectables: - if selectable[1].name == name: - file = selectable[1] + if selectable == p: + file = selectables[selectable] break # When we hit none, then the given path must be invalid