AGOS: Use Common::File instead of SearchMan.

This makes sure the hack from Common::File for filenames with a trailing dot
is used as expected.
This commit is contained in:
Johannes Schickel 2014-01-22 00:53:21 +01:00
parent 1cee8439e7
commit 047df69407
5 changed files with 78 additions and 88 deletions

View file

@ -1031,7 +1031,12 @@ bool AGOSEngine::loadGame(const Common::String &filename, bool restartMode) {
if (restartMode) {
// Load restart state
f = SearchMan.createReadStreamForMember(filename);
Common::File *file = new Common::File();
if (!file->open(filename)) {
delete file;
file = nullptr;
}
f = file;
} else {
f = _saveFileMan->openForLoading(filename);
}
@ -1205,7 +1210,12 @@ bool AGOSEngine_Elvira2::loadGame(const Common::String &filename, bool restartMo
if (restartMode) {
// Load restart state
f = SearchMan.createReadStreamForMember(filename);
Common::File *file = new Common::File();
if (!file->open(filename)) {
delete file;
file = nullptr;
}
f = file;
} else {
f = _saveFileMan->openForLoading(filename);
}