Merge b283812bd3 into 3c3d5eeddf
This commit is contained in:
@@ -5,6 +5,7 @@
|
|||||||
#include <cinttypes>
|
#include <cinttypes>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#include "common/common_types.h"
|
#include "common/common_types.h"
|
||||||
|
#include "common/file_util.h"
|
||||||
#include "common/logging/log.h"
|
#include "common/logging/log.h"
|
||||||
#include "common/string_util.h"
|
#include "common/string_util.h"
|
||||||
#include "core/file_sys/disk_filesystem.h"
|
#include "core/file_sys/disk_filesystem.h"
|
||||||
@@ -20,8 +21,9 @@ ResultVal<std::unique_ptr<FileSystemBackend>> SaveData_Factory::Open(const Path&
|
|||||||
u64 title_id = Kernel::g_current_process->program_id;
|
u64 title_id = Kernel::g_current_process->program_id;
|
||||||
// TODO(Subv): Somehow obtain this value.
|
// TODO(Subv): Somehow obtain this value.
|
||||||
u32 user = 0;
|
u32 user = 0;
|
||||||
std::string save_directory = Common::StringFromFormat("%ssave/%016" PRIX64 "/%08X",
|
std::string save_directory = Common::StringFromFormat("%ssave/%016" PRIX64 "/%08X/",
|
||||||
nand_directory.c_str(), title_id, user);
|
nand_directory.c_str(), title_id, user);
|
||||||
|
FileUtil::CreateFullPath(save_directory); // Create path if not already created
|
||||||
auto archive = std::make_unique<Disk_FileSystem>(save_directory);
|
auto archive = std::make_unique<Disk_FileSystem>(save_directory);
|
||||||
return MakeResult<std::unique_ptr<FileSystemBackend>>(std::move(archive));
|
return MakeResult<std::unique_ptr<FileSystemBackend>>(std::move(archive));
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user