[studio] Fix New Project opening project, disable New if no project open
Some checks failed
Build / build (push) Has been cancelled

This commit is contained in:
2025-02-25 20:01:33 -06:00
parent 646ab1283f
commit c3f9cf9a64
2 changed files with 3 additions and 2 deletions

View File

@@ -84,10 +84,11 @@ ox::FileSystem &Project::romFs() noexcept {
}
ox::Error Project::mkdir(ox::StringViewCR path) const noexcept {
auto const [stat, err] = m_fs.stat(path);
auto [stat, err] = m_fs.stat(path);
if (err) {
OX_RETURN_ERROR(m_fs.mkdir(path, true));
dirAdded.emit(path);
OX_RETURN_ERROR(m_fs.stat(path).moveTo(stat));
}
return stat.fileType == ox::FileType::Directory ?
ox::Error{} : ox::Error{1, "path exists as normal file"};