mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-04 14:38:48 +00:00
launcher:scenario: Fix the way we compute scenario path/name when paths supplied
We were just iterating over the list without any check and could end up with a patch that was not corresponding to the actual scenario.
This commit is contained in:
parent
1623f7111c
commit
64afff0c3e
1 changed files with 10 additions and 9 deletions
|
@ -1950,10 +1950,11 @@ class ScenarioManager(Loggable):
|
||||||
for section in config.sections():
|
for section in config.sections():
|
||||||
if scenario_paths:
|
if scenario_paths:
|
||||||
for scenario_path in scenario_paths:
|
for scenario_path in scenario_paths:
|
||||||
|
if section in os.path.splitext(os.path.basename(scenario_path))[0]:
|
||||||
if mfile is None:
|
if mfile is None:
|
||||||
name = section
|
name = section
|
||||||
path = scenario_path
|
path = scenario_path
|
||||||
elif section in scenario_path:
|
else:
|
||||||
# The real name of the scenario is:
|
# The real name of the scenario is:
|
||||||
# filename.REALNAME.scenario
|
# filename.REALNAME.scenario
|
||||||
name = scenario_path.replace(mfile + ".", "").replace(
|
name = scenario_path.replace(mfile + ".", "").replace(
|
||||||
|
|
Loading…
Reference in a new issue