aboutsummaryrefslogtreecommitdiff
path: root/backends/fs/gp32/gp32-fs.cpp
diff options
context:
space:
mode:
authorDavid Corrales2007-10-07 00:28:38 +0000
committerDavid Corrales2007-10-07 00:28:38 +0000
commitaba30d7ea8541f7260ec7b96a8d33dd7dc06ed74 (patch)
tree86915d69c1463c4ff6fda79ab849b0f62432647b /backends/fs/gp32/gp32-fs.cpp
parent0fab64817fd027a8321e047c1007d0e7e9e135fc (diff)
downloadscummvm-rg350-aba30d7ea8541f7260ec7b96a8d33dd7dc06ed74.tar.gz
scummvm-rg350-aba30d7ea8541f7260ec7b96a8d33dd7dc06ed74.tar.bz2
scummvm-rg350-aba30d7ea8541f7260ec7b96a8d33dd7dc06ed74.zip
Commit of patch #1804861. It implements a static lastPathComponent() function in each backend, used to extract the last path component of a given path, returned by getName().
svn-id: r29159
Diffstat (limited to 'backends/fs/gp32/gp32-fs.cpp')
-rw-r--r--backends/fs/gp32/gp32-fs.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/backends/fs/gp32/gp32-fs.cpp b/backends/fs/gp32/gp32-fs.cpp
index 4fb88467ea..1df07a0d37 100644
--- a/backends/fs/gp32/gp32-fs.cpp
+++ b/backends/fs/gp32/gp32-fs.cpp
@@ -60,7 +60,6 @@ public:
// FIXME: isValid should return false if this Node can't be used!
// so client code can rely on the return value.
virtual bool isReadable() const { return true; } //FIXME: this is just a stub
- virtual bool isValid() const { return true; }
virtual bool isWritable() const { return true; } //FIXME: this is just a stub
virtual AbstractFilesystemNode *getChild(const String &n) const;
@@ -82,6 +81,9 @@ const char gpRootPath[] = "gp:\\";
* @return Pointer to the first char of the last component inside str.
*/
const char *lastPathComponent(const Common::String &str) {
+ if(str.empty())
+ return "";
+
const char *start = str.c_str();
const char *cur = start + str.size() - 2;