mirror of
https://github.com/citra-emu/citra-canary.git
synced 2024-12-23 12:35:37 +00:00
fs: remove ArchiveFactory_ExtSaveData::Initialize
This is unnecessary as any open archive would create the full path for themselves
This commit is contained in:
parent
7c97e8df62
commit
b03332d09b
|
@ -194,15 +194,6 @@ ArchiveFactory_ExtSaveData::ArchiveFactory_ExtSaveData(const std::string& mount_
|
|||
LOG_DEBUG(Service_FS, "Directory {} set as base for ExtSaveData.", mount_point);
|
||||
}
|
||||
|
||||
bool ArchiveFactory_ExtSaveData::Initialize() {
|
||||
if (!FileUtil::CreateFullPath(mount_point)) {
|
||||
LOG_ERROR(Service_FS, "Unable to create ExtSaveData base path.");
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
Path ArchiveFactory_ExtSaveData::GetCorrectedPath(const Path& path) {
|
||||
if (!shared)
|
||||
return path;
|
||||
|
|
|
@ -20,12 +20,6 @@ class ArchiveFactory_ExtSaveData final : public ArchiveFactory {
|
|||
public:
|
||||
ArchiveFactory_ExtSaveData(const std::string& mount_point, bool shared);
|
||||
|
||||
/**
|
||||
* Initialize the archive.
|
||||
* @return true if it initialized successfully
|
||||
*/
|
||||
bool Initialize();
|
||||
|
||||
std::string GetName() const override {
|
||||
return "ExtSaveData";
|
||||
}
|
||||
|
|
|
@ -646,19 +646,11 @@ void RegisterArchiveTypes() {
|
|||
|
||||
auto extsavedata_factory =
|
||||
std::make_unique<FileSys::ArchiveFactory_ExtSaveData>(sdmc_directory, false);
|
||||
if (extsavedata_factory->Initialize())
|
||||
RegisterArchiveType(std::move(extsavedata_factory), ArchiveIdCode::ExtSaveData);
|
||||
else
|
||||
LOG_ERROR(Service_FS, "Can't instantiate ExtSaveData archive with path {}",
|
||||
extsavedata_factory->GetMountPoint());
|
||||
RegisterArchiveType(std::move(extsavedata_factory), ArchiveIdCode::ExtSaveData);
|
||||
|
||||
auto sharedextsavedata_factory =
|
||||
std::make_unique<FileSys::ArchiveFactory_ExtSaveData>(nand_directory, true);
|
||||
if (sharedextsavedata_factory->Initialize())
|
||||
RegisterArchiveType(std::move(sharedextsavedata_factory), ArchiveIdCode::SharedExtSaveData);
|
||||
else
|
||||
LOG_ERROR(Service_FS, "Can't instantiate SharedExtSaveData archive with path {}",
|
||||
sharedextsavedata_factory->GetMountPoint());
|
||||
RegisterArchiveType(std::move(sharedextsavedata_factory), ArchiveIdCode::SharedExtSaveData);
|
||||
|
||||
// Create the NCCH archive, basically a small variation of the RomFS archive
|
||||
auto savedatacheck_factory = std::make_unique<FileSys::ArchiveFactory_NCCH>();
|
||||
|
|
Loading…
Reference in a new issue