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:
parent
1cee8439e7
commit
047df69407
5 changed files with 78 additions and 88 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue