Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
6543 committed Jan 8, 2020
1 parent 632fb5b commit baff844
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions modules/setting/queue.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ package setting
import (
"fmt"
"path"
"path/filepath"
"strconv"
"strings"
"time"
Expand Down Expand Up @@ -55,8 +56,8 @@ func GetQueueSettings(name string) QueueSettings {
q.QueueName = key.MustString(q.QueueName)
}
}
if !path.IsAbs(q.DataDir) {
q.DataDir = path.Join(AppDataPath, q.DataDir)
if !filepath.IsAbs(q.DataDir) {
q.DataDir = filepath.Join(AppDataPath, q.DataDir)
}
sec.Key("DATADIR").SetValue(q.DataDir)
// The rest are...
Expand All @@ -82,8 +83,8 @@ func GetQueueSettings(name string) QueueSettings {
func NewQueueService() {
sec := Cfg.Section("queue")
Queue.DataDir = sec.Key("DATADIR").MustString("queues/")
if !path.IsAbs(Queue.DataDir) {
Queue.DataDir = path.Join(AppDataPath, Queue.DataDir)
if !filepath.IsAbs(Queue.DataDir) {
Queue.DataDir = filepath.Join(AppDataPath, Queue.DataDir)
}
Queue.Length = sec.Key("LENGTH").MustInt(20)
Queue.BatchLength = sec.Key("BATCH_LENGTH").MustInt(20)
Expand Down

0 comments on commit baff844

Please sign in to comment.