Fix OsFileSystem initial directory creation

By passing basePath as an argument the CreateDirectory function did mkdir(basePath+basePath) which is obviously not the intended behaviour, fix this.
This commit is contained in:
Billy Laws 2022-06-03 19:33:31 +01:00
parent 84dec7561c
commit 2bbeb6b08f

View File

@ -10,8 +10,8 @@
namespace skyline::vfs {
OsFileSystem::OsFileSystem(const std::string &basePath) : FileSystem(), basePath(basePath.ends_with('/') ? basePath : basePath + '/') {
if (!DirectoryExists(basePath))
if (!CreateDirectory(basePath, true))
if (!DirectoryExists(""))
if (!CreateDirectory("", true))
throw exception("Error creating the OS filesystem backing directory");
}