[FS] Add directory stuff, clean up

This commit is contained in:
wheremyfoodat 2023-03-29 00:23:55 +03:00
parent 3ca324350b
commit 4bef096f04
10 changed files with 70 additions and 9 deletions

View file

@ -38,7 +38,8 @@ DeleteFileResult ExtSaveDataArchive::deleteFile(const FSPath& path) {
fs::path p = IOFile::getAppData() / "NAND";
p += fs::path(path.utf16_string).make_preferred();
bool success = fs::remove(p);
std::error_code ec;
bool success = fs::remove(p, ec);
return success ? DeleteFileResult::Success : DeleteFileResult::FileNotFound;
}