From 0ce7c5e3da8b9a508f0467b31167cd65e50ed2a2 Mon Sep 17 00:00:00 2001 From: Tim Scheuermann Date: Tue, 20 Dec 2022 08:59:40 +0100 Subject: [PATCH] Use path rather than filepath for embedded files (#21896) Co-authored-by: Tim Scheuermann --- store/sqlstore/store.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/store/sqlstore/store.go b/store/sqlstore/store.go index 4c1bf1f05b..630e7705d3 100644 --- a/store/sqlstore/store.go +++ b/store/sqlstore/store.go @@ -9,7 +9,7 @@ import ( dbsql "database/sql" "fmt" "log" - "path/filepath" + "path" "strconv" "strings" "sync" @@ -1041,7 +1041,7 @@ func (ss *SqlStore) hasLicense() bool { func (ss *SqlStore) migrate(direction migrationDirection) error { assets := db.Assets() - assetsList, err := assets.ReadDir(filepath.Join("migrations", ss.DriverName())) + assetsList, err := assets.ReadDir(path.Join("migrations", ss.DriverName())) if err != nil { return err } @@ -1054,7 +1054,7 @@ func (ss *SqlStore) migrate(direction migrationDirection) error { src, err := mbindata.WithInstance(&mbindata.AssetSource{ Names: assetNamesForDriver, AssetFunc: func(name string) ([]byte, error) { - return assets.ReadFile(filepath.Join("migrations", ss.DriverName(), name)) + return assets.ReadFile(path.Join("migrations", ss.DriverName(), name)) }, }) if err != nil {