mirror of
https://github.com/rumanzo/bt2qbt.git
synced 2024-11-22 02:12:39 +01:00
fix opts test
fix opts categories handle
This commit is contained in:
parent
61abb0345d
commit
7b9c97cfe1
@ -74,7 +74,7 @@ func HandleOpts(opts *Opts) {
|
||||
qbtRootDir, _ := strings.CutSuffix(qbtDir, `data/BT_backup`)
|
||||
|
||||
// check that user not define categories
|
||||
refOpts := MakeOpts()
|
||||
refOpts := PrepareOpts()
|
||||
if refOpts.Categories == opts.Categories {
|
||||
opts.Categories = fileHelpers.Join([]string{qbtRootDir, `config/categories.json`}, opts.PathSeparator)
|
||||
}
|
||||
|
@ -167,7 +167,7 @@ func TestOptionsHandle(t *testing.T) {
|
||||
for _, testCase := range cases {
|
||||
t.Run(testCase.name, func(t *testing.T) {
|
||||
if testCase.opts.Categories == `` {
|
||||
refOpts := MakeOpts()
|
||||
refOpts := PrepareOpts()
|
||||
testCase.opts.Categories = refOpts.Categories
|
||||
}
|
||||
HandleOpts(testCase.opts)
|
||||
|
Loading…
Reference in New Issue
Block a user