mirror of
https://github.com/haiwen/seafile-server.git
synced 2025-09-13 13:51:53 +00:00
Allow comment sybols # and ; inside values (#615)
Co-authored-by: heran yang <heran.yang@seafile.com>
This commit is contained in:
@@ -72,7 +72,9 @@ func (f *LogFormatter) Format(entry *log.Entry) ([]byte, error) {
|
|||||||
|
|
||||||
func loadCcnetDB() {
|
func loadCcnetDB() {
|
||||||
ccnetConfPath := filepath.Join(centralDir, "ccnet.conf")
|
ccnetConfPath := filepath.Join(centralDir, "ccnet.conf")
|
||||||
config, err := ini.Load(ccnetConfPath)
|
opts := ini.LoadOptions{}
|
||||||
|
opts.SpaceBeforeInlineComment = true
|
||||||
|
config, err := ini.LoadSources(opts, ccnetConfPath)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatalf("Failed to load ccnet.conf: %v", err)
|
log.Fatalf("Failed to load ccnet.conf: %v", err)
|
||||||
}
|
}
|
||||||
@@ -171,7 +173,9 @@ func registerCA(capath string) {
|
|||||||
func loadSeafileDB() {
|
func loadSeafileDB() {
|
||||||
seafileConfPath := filepath.Join(centralDir, "seafile.conf")
|
seafileConfPath := filepath.Join(centralDir, "seafile.conf")
|
||||||
|
|
||||||
config, err := ini.Load(seafileConfPath)
|
opts := ini.LoadOptions{}
|
||||||
|
opts.SpaceBeforeInlineComment = true
|
||||||
|
config, err := ini.LoadSources(opts, seafileConfPath)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatalf("Failed to load seafile.conf: %v", err)
|
log.Fatalf("Failed to load seafile.conf: %v", err)
|
||||||
}
|
}
|
||||||
|
@@ -80,7 +80,9 @@ func LoadFileServerOptions(centralDir string) {
|
|||||||
|
|
||||||
seafileConfPath := filepath.Join(centralDir, "seafile.conf")
|
seafileConfPath := filepath.Join(centralDir, "seafile.conf")
|
||||||
|
|
||||||
config, err := ini.Load(seafileConfPath)
|
opts := ini.LoadOptions{}
|
||||||
|
opts.SpaceBeforeInlineComment = true
|
||||||
|
config, err := ini.LoadSources(opts, seafileConfPath)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatalf("Failed to load seafile.conf: %v", err)
|
log.Fatalf("Failed to load seafile.conf: %v", err)
|
||||||
}
|
}
|
||||||
|
@@ -39,7 +39,9 @@ func init() {
|
|||||||
func loadNotifConfig() {
|
func loadNotifConfig() {
|
||||||
notifyConfPath := filepath.Join(configDir, "seafile.conf")
|
notifyConfPath := filepath.Join(configDir, "seafile.conf")
|
||||||
|
|
||||||
config, err := ini.Load(notifyConfPath)
|
opts := ini.LoadOptions{}
|
||||||
|
opts.SpaceBeforeInlineComment = true
|
||||||
|
config, err := ini.LoadSources(opts, notifyConfPath)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatalf("Failed to load notification.conf: %v", err)
|
log.Fatalf("Failed to load notification.conf: %v", err)
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user