diff options
author | Sven Hesse | 2007-08-02 16:19:47 +0000 |
---|---|---|
committer | Sven Hesse | 2007-08-02 16:19:47 +0000 |
commit | b9092cc18d717cf62d1a09364916bbca3b671296 (patch) | |
tree | 81332fc2c15b1d232f8cf480d71ec866f7850a0f /engines/gob | |
parent | 1c262740613075cbfd525877d8f3011e4431e063 (diff) | |
download | scummvm-rg350-b9092cc18d717cf62d1a09364916bbca3b671296.tar.gz scummvm-rg350-b9092cc18d717cf62d1a09364916bbca3b671296.tar.bz2 scummvm-rg350-b9092cc18d717cf62d1a09364916bbca3b671296.zip |
Strip path from save file name
svn-id: r28410
Diffstat (limited to 'engines/gob')
-rw-r--r-- | engines/gob/saveload_v2.cpp | 4 | ||||
-rw-r--r-- | engines/gob/saveload_v3.cpp | 4 |
2 files changed, 8 insertions, 0 deletions
diff --git a/engines/gob/saveload_v2.cpp b/engines/gob/saveload_v2.cpp index 35c3429ab6..13f23cccb6 100644 --- a/engines/gob/saveload_v2.cpp +++ b/engines/gob/saveload_v2.cpp @@ -47,6 +47,10 @@ SaveLoad_v2::SaveLoad_v2(GobEngine *vm, const char *targetName) : } SaveType SaveLoad_v2::getSaveType(const char *fileName) { + const char *backSlash; + if ((backSlash = strrchr(fileName, '\\'))) + fileName = backSlash + 1; + if (!scumm_stricmp(fileName, "cat.inf")) return kSaveGame; if (!scumm_stricmp(fileName, "cat.cat")) diff --git a/engines/gob/saveload_v3.cpp b/engines/gob/saveload_v3.cpp index b376a8a75c..2f143d683a 100644 --- a/engines/gob/saveload_v3.cpp +++ b/engines/gob/saveload_v3.cpp @@ -58,6 +58,10 @@ SaveLoad_v3::SaveLoad_v3(GobEngine *vm, const char *targetName) : } SaveType SaveLoad_v3::getSaveType(const char *fileName) { + const char *backSlash; + if ((backSlash = strrchr(fileName, '\\'))) + fileName = backSlash + 1; + if (!scumm_stricmp(fileName, "cat.inf")) return kSaveGame; if (!scumm_stricmp(fileName, "ima.inf")) |