mirror of
https://github.com/zitadel/zitadel.git
synced 2025-02-28 23:17:23 +00:00
fix: change usage from filepath to path (#9260)
# Which Problems Are Solved Paths for setup steps are joined with "\" when binary is started under Windows, which results in wrongly joined paths. # How the Problems Are Solved Replace the usage of "filepath" with "path" package, which does only join with "/" and nothing OS specific. # Additional Changes None # Additional Context Closes #9227
This commit is contained in:
parent
3fc68e5d60
commit
a59c6b9f84
@ -5,7 +5,7 @@ import (
|
||||
"embed"
|
||||
_ "embed"
|
||||
"net/http"
|
||||
"path/filepath"
|
||||
"path"
|
||||
|
||||
"github.com/spf13/cobra"
|
||||
"github.com/spf13/viper"
|
||||
@ -279,7 +279,7 @@ func mustExecuteMigration(ctx context.Context, eventstoreClient *eventstore.Even
|
||||
// Typ describes the database dialect and may be omitted if no
|
||||
// dialect specific migration is specified.
|
||||
func readStmt(fs embed.FS, folder, typ, filename string) (string, error) {
|
||||
stmt, err := fs.ReadFile(filepath.Join(folder, typ, filename))
|
||||
stmt, err := fs.ReadFile(path.Join(folder, typ, filename))
|
||||
return string(stmt), err
|
||||
}
|
||||
|
||||
@ -293,7 +293,7 @@ type statement struct {
|
||||
// Typ describes the database dialect and may be omitted if no
|
||||
// dialect specific migration is specified.
|
||||
func readStatements(fs embed.FS, folder, typ string) ([]statement, error) {
|
||||
basePath := filepath.Join(folder, typ)
|
||||
basePath := path.Join(folder, typ)
|
||||
dir, err := fs.ReadDir(basePath)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
Loading…
x
Reference in New Issue
Block a user