fix sec
Some checks failed
CloudSave/pipeline/head Something is wrong with the build of this commit

This commit is contained in:
2025-09-07 01:31:14 +02:00
parent af11e843a4
commit 46f312078d
12 changed files with 181 additions and 178 deletions

View File

@@ -4,6 +4,7 @@ import (
"encoding/json"
"fmt"
"os"
"path/filepath"
)
type (
@@ -22,7 +23,7 @@ type (
)
func Load(path string) (Configuration, error) {
f, err := os.OpenFile(path, os.O_RDONLY, 0)
f, err := os.OpenFile(filepath.Clean(path), os.O_RDONLY, 0)
if err != nil {
return Configuration{}, fmt.Errorf("failed to open configuration file: %w", err)
}