This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user