mirror of
https://git.sr.ht/~phw/scotty
synced 2025-06-06 12:58:35 +02:00
Use filepath.Join instead of file.Join
This commit is contained in:
parent
142d38e9db
commit
34b6bb9aa3
2 changed files with 2 additions and 4 deletions
|
@ -20,7 +20,6 @@ package spotifyhistory
|
|||
import (
|
||||
"context"
|
||||
"os"
|
||||
"path"
|
||||
"path/filepath"
|
||||
"slices"
|
||||
"sort"
|
||||
|
@ -74,7 +73,7 @@ func (b *SpotifyHistoryBackend) InitConfig(config *config.ServiceConfig) error {
|
|||
}
|
||||
|
||||
func (b *SpotifyHistoryBackend) ExportListens(ctx context.Context, oldestTimestamp time.Time, results chan models.ListensResult, progress chan models.TransferProgress) {
|
||||
files, err := filepath.Glob(path.Join(b.dirPath, historyFileGlob))
|
||||
files, err := filepath.Glob(filepath.Join(b.dirPath, historyFileGlob))
|
||||
p := models.TransferProgress{
|
||||
Export: &models.Progress{},
|
||||
}
|
||||
|
|
|
@ -19,7 +19,6 @@ import (
|
|||
"errors"
|
||||
"fmt"
|
||||
"os"
|
||||
"path"
|
||||
"path/filepath"
|
||||
"regexp"
|
||||
"strings"
|
||||
|
@ -40,7 +39,7 @@ const (
|
|||
func DefaultConfigDir() string {
|
||||
configDir, err := os.UserConfigDir()
|
||||
cobra.CheckErr(err)
|
||||
return path.Join(configDir, version.AppName)
|
||||
return filepath.Join(configDir, version.AppName)
|
||||
}
|
||||
|
||||
// initConfig reads in config file and ENV variables if set.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue