From 1994249ef230c7bc4644d988535b882d7936665b Mon Sep 17 00:00:00 2001 From: Alexander Reim Date: Thu, 1 Oct 2020 13:03:52 +0200 Subject: [PATCH] WII: Add support for WiiFilesystemNode::createDirectory() --- backends/fs/wii/wii-fs.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/backends/fs/wii/wii-fs.cpp b/backends/fs/wii/wii-fs.cpp index eb0beed166a..7a7de188094 100644 --- a/backends/fs/wii/wii-fs.cpp +++ b/backends/fs/wii/wii-fs.cpp @@ -165,7 +165,7 @@ bool WiiFilesystemNode::getChildren(AbstractFSList &list, ListMode mode, bool hi Common::String newPath(_path); if (newPath.lastChar() != '/') - newPath += '/'; + newPath += '/'; newPath += pent->d_name; bool isDir = ( pent->d_type == DT_DIR ); @@ -221,7 +221,15 @@ Common::WriteStream *WiiFilesystemNode::createWriteStream() { } bool WiiFilesystemNode::createDirectory() { - warning("WiiFilesystemNode::createDirectory(): Not supported"); + if(!_exists) { + if (mkdir(_path.c_str(), 0755) == 0) { + _exists = true; + _isDirectory = true; + _isReadable = true; + _isWritable = true; + } + } + return _exists && _isDirectory; }