From 0eefe6e4d15cbc7a5902dfbe5e7742ef4ea71902 Mon Sep 17 00:00:00 2001 From: Subv Date: Sun, 4 Mar 2018 13:03:58 -0500 Subject: FS: Make EnsureSaveData create the savedata folder when called for the first time. --- src/core/hle/service/filesystem/filesystem.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/core/hle/service/filesystem/filesystem.cpp') diff --git a/src/core/hle/service/filesystem/filesystem.cpp b/src/core/hle/service/filesystem/filesystem.cpp index 32752aea5..ef05955b9 100644 --- a/src/core/hle/service/filesystem/filesystem.cpp +++ b/src/core/hle/service/filesystem/filesystem.cpp @@ -43,6 +43,19 @@ ResultVal> OpenFileSystem(Type type, return itr->second->Open(path); } +ResultCode FormatFileSystem(Type type) { + LOG_TRACE(Service_FS, "Formatting FileSystem with type=%d", type); + + auto itr = filesystem_map.find(type); + if (itr == filesystem_map.end()) { + // TODO(bunnei): Find a better error code for this + return ResultCode(-1); + } + + FileSys::Path unused; + return itr->second->Format(unused); +} + void RegisterFileSystems() { filesystem_map.clear(); -- cgit v1.2.3