[Scummvm-tracker] [ScummVM :: Bugs] #12864: AGS: Crash making in-game saves in Strangeland
ScummVM :: Bugs
trac at scummvm.org
Sun Aug 29 22:27:53 UTC 2021
#12864: AGS: Crash making in-game saves in Strangeland
------------------------+--------------------------
Reporter: dreammaster | Owner: (none)
Type: defect | Status: new
Priority: normal | Component: Engine: AGS
Version: | Resolution:
Keywords: | Game:
------------------------+--------------------------
Comment (by criezy):
It indeed does:
{{{
criezy at MacBook-Air scummvm % ./scummvm --debugflags=FilePath strangeland
User picked target 'strangeland' (engine ID 'ags', game ID
'strangeland')...
Looking for a plugin supporting this target... Adventure Game Studio
[...]
ResolveScriptPath($SAVEGAMEDIR$/test/save2.bmp)
Adding ScummVM game target prefix
ResolveScriptPath($SAVEGAMEDIR$/test/saveHD2.bmp)
Adding ScummVM game target prefix
ResolveScriptPath($SAVEGAMEDIR$/save2_test.dat)
Adding ScummVM game target prefix
ResolveScriptPath($SAVEGAMEDIR$/test/save2_test.dat)
Adding ScummVM game target prefix
Assertion failed: (!n.contains('/')), function getChild, file
backends/fs/posix/posix-fs.cpp, line 139.
}}}
Here `test` was the name I gave when trying to save into the second slot.
I already noticed in the past that `SaveFileManager` cannot deal with
subdirectories and wondered if we needed to flatten paths in
`ResolveScriptPath`. But since I had not found a game needing that yet,
and never looked into it further.
My suggestion would be to flatten save paths if needed in
`ResolveScriptPath`. So for example `$SAVEGAMEDIR$/test/save2_test.dat`
would become `/saves/test-save2_test.dat` (instead of
`/saves/test/save2_test.dat`).
I can look into that further tomorrow if you want.
--
Ticket URL: <https://bugs.scummvm.org/ticket/12864#comment:1>
ScummVM :: Bugs <https://bugs.scummvm.org>
ScummVM
More information about the Scummvm-tracker
mailing list