mirror of
https://gitea.osmocom.org/sim-card/pysim.git
synced 2026-03-17 10:58:34 +03:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user