diff options
| author | David Corrales | 2007-10-07 00:28:38 +0000 |
|---|---|---|
| committer | David Corrales | 2007-10-07 00:28:38 +0000 |
| commit | aba30d7ea8541f7260ec7b96a8d33dd7dc06ed74 (patch) | |
| tree | 86915d69c1463c4ff6fda79ab849b0f62432647b /backends/fs/windows | |
| parent | 0fab64817fd027a8321e047c1007d0e7e9e135fc (diff) | |
| download | scummvm-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/windows')
| -rw-r--r-- | backends/fs/windows/windows-fs.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/backends/fs/windows/windows-fs.cpp b/backends/fs/windows/windows-fs.cpp index e048980ba1..7bb2681e3c 100644 --- a/backends/fs/windows/windows-fs.cpp +++ b/backends/fs/windows/windows-fs.cpp @@ -92,7 +92,6 @@ public: virtual String getPath() const { return _path; } virtual bool isDirectory() const { return _isDirectory; } virtual bool isReadable() const { return _access(_path.c_str(), R_OK) == 0; } - virtual bool isValid() const { return _isValid; } virtual bool isWritable() const { return _access(_path.c_str(), W_OK) == 0; } virtual AbstractFilesystemNode *getChild(const String &n) const; @@ -139,6 +138,9 @@ private: * @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; |
