mirror of
https://github.com/wheremyfoodat/Panda3DS.git
synced 2025-04-21 21:05:50 +12:00
Start adding SD card support
This commit is contained in:
parent
3292b051be
commit
7ada8da8a8
6 changed files with 62 additions and 20 deletions
|
@ -92,11 +92,13 @@ HorizonResult SaveDataArchive::deleteFile(const FSPath& path) {
|
|||
|
||||
FileDescriptor SaveDataArchive::openFile(const FSPath& path, const FilePerms& perms) {
|
||||
if (path.type == PathType::UTF16) {
|
||||
if (!isPathSafe<PathType::UTF16>(path))
|
||||
if (!isPathSafe<PathType::UTF16>(path)) {
|
||||
Helpers::panic("Unsafe path in SaveData::OpenFile");
|
||||
}
|
||||
|
||||
if (perms.raw == 0 || (perms.create() && !perms.write()))
|
||||
if (perms.raw == 0 || (perms.create() && !perms.write())) {
|
||||
Helpers::panic("[SaveData] Unsupported flags for OpenFile");
|
||||
}
|
||||
|
||||
fs::path p = IOFile::getAppData() / "SaveData";
|
||||
p += fs::path(path.utf16_string).make_preferred();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue