diff options
-rw-r--r-- | backends/fs/psp/psp-fs-factory.cpp | 3 | ||||
-rw-r--r-- | backends/fs/psp/psp-fs.cpp | 2 |
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; } |