Fix VFS CreateFile directory creation

This commit is contained in:
Billy Laws 2022-06-04 19:19:30 +01:00
parent f5bcb40c41
commit d9f6540831

View File

@ -19,7 +19,7 @@ namespace skyline::vfs {
auto fullPath{basePath + path}; auto fullPath{basePath + path};
// Create a directory that will hold the file // Create a directory that will hold the file
CreateDirectory(fullPath.substr(0, fullPath.find_last_of('/')), true); CreateDirectory(path.substr(0, path.find_last_of('/')), true);
int fd{open(fullPath.c_str(), O_RDWR | O_CREAT, S_IRUSR | S_IWUSR)}; int fd{open(fullPath.c_str(), O_RDWR | O_CREAT, S_IRUSR | S_IWUSR)};
if (fd < 0) { if (fd < 0) {
if (errno != ENOENT) if (errno != ENOENT)