mirror of
https://github.com/wheremyfoodat/Panda3DS.git
synced 2025-04-21 21:05:50 +12:00
[SaveData] Implement OpenDirectory with filename
This commit is contained in:
parent
3abc60457d
commit
876835852d
2 changed files with 6 additions and 3 deletions
|
@ -66,8 +66,10 @@ Rust::Result<DirectorySession, FSResult> SaveDataArchive::openDirectory(const FS
|
|||
fs::path p = IOFile::getAppData() / "SaveData";
|
||||
p += fs::path(path.utf16_string).make_preferred();
|
||||
|
||||
if (fs::is_regular_file(p))
|
||||
Helpers::panic("OpenDirectory: Tried to open directory but it's actually a file");
|
||||
if (fs::is_regular_file(p)) {
|
||||
printf("SaveData: OpenArchive used with a file path");
|
||||
return Err(FSResult::UnexpectedFileOrDir);
|
||||
}
|
||||
|
||||
if (fs::is_directory(p)) {
|
||||
return Ok(DirectorySession(this, p));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue