aboutsummaryrefslogtreecommitdiff
path: root/backends/fs
diff options
context:
space:
mode:
Diffstat (limited to 'backends/fs')
-rw-r--r--backends/fs/psp/psp-fs.cpp16
1 files changed, 15 insertions, 1 deletions
diff --git a/backends/fs/psp/psp-fs.cpp b/backends/fs/psp/psp-fs.cpp
index e79d07d64a..34727a6392 100644
--- a/backends/fs/psp/psp-fs.cpp
+++ b/backends/fs/psp/psp-fs.cpp
@@ -240,7 +240,21 @@ Common::WriteStream *PSPFilesystemNode::createWriteStream() {
}
bool PSPFilesystemNode::createDirectory() {
- warning("PSPFilesystemNode::createDirectory(): Not supported");
+ DEBUG_ENTER_FUNC();
+
+ if (PowerMan.beginCriticalSection() == PowerManager::Blocked)
+ PSP_DEBUG_PRINT_FUNC("Suspended\n"); // Make sure to block in case of suspend
+
+ PSP_DEBUG_PRINT_FUNC("path [%s]\n", _path.c_str());
+
+ if (sceIoMkdir(_path.c_str(), 0777) == 0) {
+ struct stat st;
+ _isValid = (0 == stat(_path.c_str(), &st));
+ _isDirectory = S_ISDIR(st.st_mode);
+ }
+
+ PowerMan.endCriticalSection();
+
return _isValid && _isDirectory;
}