aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoost Peters2009-08-15 10:44:58 +0000
committerJoost Peters2009-08-15 10:44:58 +0000
commitaae6c98945122c974292a429cfc1a5ee01605e88 (patch)
treea96906f4e5e5ffda366e5898f4443c32521772f6
parenta73523533c4f00d6980c544c024bfb114041ee68 (diff)
downloadscummvm-rg350-aae6c98945122c974292a429cfc1a5ee01605e88.tar.gz
scummvm-rg350-aae6c98945122c974292a429cfc1a5ee01605e88.tar.bz2
scummvm-rg350-aae6c98945122c974292a429cfc1a5ee01605e88.zip
Properly implement PSPFilesystemFactory::makeCurrentDirectoryFileNode()
svn-id: r43404
-rw-r--r--backends/fs/psp/psp-fs-factory.cpp3
-rw-r--r--backends/fs/psp/psp-fs.cpp2
2 files changed, 3 insertions, 2 deletions
diff --git a/backends/fs/psp/psp-fs-factory.cpp b/backends/fs/psp/psp-fs-factory.cpp
index cfe8ed27d1..27bee4de86 100644
--- a/backends/fs/psp/psp-fs-factory.cpp
+++ b/backends/fs/psp/psp-fs-factory.cpp
@@ -33,7 +33,8 @@ AbstractFSNode *PSPFilesystemFactory::makeRootFileNode() const {
}
AbstractFSNode *PSPFilesystemFactory::makeCurrentDirectoryFileNode() const {
- return new PSPFilesystemNode();
+ char buf[MAXPATHLEN];
+ return getcwd(buf, MAXPATHLEN) ? new PSPFilesystemNode(buf) : NULL;
}
AbstractFSNode *PSPFilesystemFactory::makeFileNodePath(const Common::String &path) const {
diff --git a/backends/fs/psp/psp-fs.cpp b/backends/fs/psp/psp-fs.cpp
index 9936d37f77..f5ff65c9fa 100644
--- a/backends/fs/psp/psp-fs.cpp
+++ b/backends/fs/psp/psp-fs.cpp
@@ -59,7 +59,7 @@ public:
* @param path Common::String with the path the new node should point to.
* @param verify true if the isValid and isDirectory flags should be verified during the construction.
*/
- PSPFilesystemNode(const Common::String &p, bool verify);
+ PSPFilesystemNode(const Common::String &p, bool verify = true);
virtual bool exists() const { return access(_path.c_str(), F_OK) == 0; }
virtual Common::String getDisplayName() const { return _displayName; }