From c4c256f56ad4db7064aa2a2bc769f57efcbd5e38 Mon Sep 17 00:00:00 2001 From: Chloe <25727384+ogniK5377@users.noreply.github.com> Date: Thu, 3 Jun 2021 10:46:29 +1000 Subject: fspsrv: Implement DisableAutoSaveDataCreation (#6355) - Used by Mii Edit --- src/core/file_sys/savedata_factory.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/core/file_sys/savedata_factory.cpp') diff --git a/src/core/file_sys/savedata_factory.cpp b/src/core/file_sys/savedata_factory.cpp index 6c3685927..b5254dd75 100644 --- a/src/core/file_sys/savedata_factory.cpp +++ b/src/core/file_sys/savedata_factory.cpp @@ -105,7 +105,7 @@ ResultVal SaveDataFactory::Open(SaveDataSpaceId space, auto out = dir->GetDirectoryRelative(save_directory); - if (out == nullptr && ShouldSaveDataBeAutomaticallyCreated(space, meta)) { + if (out == nullptr && (ShouldSaveDataBeAutomaticallyCreated(space, meta) && auto_create)) { return Create(space, meta); } @@ -199,4 +199,8 @@ void SaveDataFactory::WriteSaveDataSize(SaveDataType type, u64 title_id, u128 us size_file->WriteObject(new_value); } +void SaveDataFactory::SetAutoCreate(bool state) { + auto_create = state; +} + } // namespace FileSys -- cgit v1.2.3