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
This commit is contained in:
Philipp Maier
2024-08-21 11:43:00 +02:00
committed by laforge
parent a5e2a8dbfd
commit 89dbdbdccc

View File

@@ -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