aboutsummaryrefslogtreecommitdiff
path: root/engines/gob/totfile.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/gob/totfile.cpp')
-rw-r--r--engines/gob/totfile.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/engines/gob/totfile.cpp b/engines/gob/totfile.cpp
index 46d422d44d..2506c00b19 100644
--- a/engines/gob/totfile.cpp
+++ b/engines/gob/totfile.cpp
@@ -114,4 +114,14 @@ Common::String TOTFile::createFileName(const Common::String &base, bool &isLOM)
return base + ".tot";
}
+Common::String TOTFile::getFileBase(const Common::String &fileName) {
+ const char *dot;
+ if ((dot = strrchr(fileName.c_str(), '.'))) {
+ // fileName includes an extension
+ return Common::String(fileName.c_str(), dot);
+ }
+
+ return fileName;
+}
+
} // End of namespace Gob