Do not create seeddb when loading it

This commit is contained in:
Pengfei
2021-07-06 16:48:10 +08:00
parent cb6d58b538
commit be5701b7ee
+1 -8
View File
@@ -14,14 +14,7 @@ namespace Core {
bool SeedDB::Load(const std::string& path) { bool SeedDB::Load(const std::string& path) {
seeds.clear(); seeds.clear();
if (!FileUtil::Exists(path)) { if (!FileUtil::Exists(path)) {
if (!FileUtil::CreateFullPath(path)) { LOG_WARNING(Service_FS, "Seed database does not exist");
LOG_ERROR(Service_FS, "Failed to create seed database");
return false;
}
if (!Save(path)) {
LOG_ERROR(Service_FS, "Failed to save seed database");
return false;
}
return true; return true;
} }
FileUtil::IOFile file{path, "rb"}; FileUtil::IOFile file{path, "rb"};