Skip to content

Commit 1d80d96

Browse files
committed
BUGFIX:
- Scheduler: load mission_file did not work if full path was provided
1 parent aab9e47 commit 1d80d96

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

plugins/scheduler/commands.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,17 @@ async def restart_mission(self, server: Server, config: dict, rconf: dict, max_w
312312
if not os.path.isabs(filename):
313313
filename = os.path.join(await server.get_missions_dir(), filename)
314314
for idx, mission in enumerate(await server.getMissionList()):
315-
if os.path.normpath(mission).lower() == os.path.normpath(filename).lower():
315+
if '.dcssb' in mission:
316+
secondary = mission
317+
primary = os.path.join(os.path.dirname(mission).replace('.dcssb', ''),
318+
os.path.basename(mission))
319+
else:
320+
primary = mission
321+
secondary = os.path.join(os.path.dirname(mission), '.dcssb', os.bath.basename(mission))
322+
if os.path.normpath(filename).lower() in [
323+
os.path.normpath(primary).lower(),
324+
os.path.normpath(secondary).lower()
325+
]:
316326
mission_id = idx + 1
317327
break
318328
else:

0 commit comments

Comments
 (0)