From b91305c4908ec6094e36f1df035fd74aac7bb2c4 Mon Sep 17 00:00:00 2001 From: MaysWind Date: Mon, 29 Jul 2024 22:37:59 +0800 Subject: [PATCH] modify setting key --- conf/ezbookkeeping.ini | 2 +- pkg/settings/setting.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/conf/ezbookkeeping.ini b/conf/ezbookkeeping.ini index bce1933c..5071a742 100644 --- a/conf/ezbookkeeping.ini +++ b/conf/ezbookkeeping.ini @@ -94,7 +94,7 @@ log_path = log/ezbookkeeping.log [storage] # Object storage type, supports "local_filesystem" and "minio" currently -storage_type = local_filesystem +type = local_filesystem # For "local_filesystem" storage only, the storage root path (relative or absolute path) local_filesystem_path = storage/ diff --git a/pkg/settings/setting.go b/pkg/settings/setting.go index d0479a5b..fff9c355 100644 --- a/pkg/settings/setting.go +++ b/pkg/settings/setting.go @@ -553,9 +553,9 @@ func loadLogConfiguration(config *Config, configFile *ini.File, sectionName stri } func loadStorageConfiguration(config *Config, configFile *ini.File, sectionName string) error { - if getConfigItemStringValue(configFile, sectionName, "storage_type") == LocalFileSystemObjectStorageType { + if getConfigItemStringValue(configFile, sectionName, "type") == LocalFileSystemObjectStorageType { config.StorageType = LocalFileSystemObjectStorageType - } else if getConfigItemStringValue(configFile, sectionName, "storage_type") == MinIOStorageType { + } else if getConfigItemStringValue(configFile, sectionName, "type") == MinIOStorageType { config.StorageType = MinIOStorageType } else { return errs.ErrInvalidStorageType