mirror of
https://github.com/navidrome/navidrome.git
synced 2025-04-15 19:50:37 +03:00
refactor: use stdlib filepath.FromSlash
This commit is contained in:
parent
0e01f9a0f9
commit
464880dd31
@ -2,8 +2,7 @@ package persistence
|
||||
|
||||
import (
|
||||
"context"
|
||||
"os"
|
||||
"strings"
|
||||
"path/filepath"
|
||||
"testing"
|
||||
|
||||
"github.com/astaxie/beego/orm"
|
||||
@ -79,7 +78,7 @@ var (
|
||||
)
|
||||
|
||||
func P(path string) string {
|
||||
return strings.ReplaceAll(path, "/", string(os.PathSeparator))
|
||||
return filepath.FromSlash(path)
|
||||
}
|
||||
|
||||
var _ = Describe("Initialize test DB", func() {
|
||||
|
@ -1,8 +1,7 @@
|
||||
package scanner
|
||||
|
||||
import (
|
||||
"os"
|
||||
"strings"
|
||||
"path/filepath"
|
||||
"testing"
|
||||
|
||||
"github.com/deluan/navidrome/log"
|
||||
@ -19,5 +18,5 @@ func TestScanner(t *testing.T) {
|
||||
}
|
||||
|
||||
func P(path string) string {
|
||||
return strings.ReplaceAll(path, "/", string(os.PathSeparator))
|
||||
return filepath.FromSlash(path)
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user