Skip to content

Commit 298716e

Browse files
sofushniwilltry42
authored andcommitted
fix: files option for config on windows
1 parent 568f1c6 commit 298716e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

pkg/util/files.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ func ReadFileSource(configFile, source string) ([]byte, error) {
9595
// ResolveFileDestination determines the file destination and resolves it if it has a magic shortcut.
9696
func ResolveFileDestination(destPath string) (string, error) {
9797
// If the destination path is absolute, then use it as it is.
98-
if filepath.IsAbs(destPath) {
98+
if path.IsAbs(destPath) {
9999
l.Log().Debugf("resolved destination with absolute path '%s'", destPath)
100100
return destPath, nil
101101
}
@@ -104,9 +104,9 @@ func ResolveFileDestination(destPath string) (string, error) {
104104
destPathTree := strings.Split(destPath, string(os.PathSeparator))
105105
if shortcutPath, found := k3s.K3sPathShortcuts[destPathTree[0]]; found {
106106
destPathTree[0] = shortcutPath
107-
destPathResolved := filepath.Join(destPathTree...)
107+
destPathResolved := path.Join(destPathTree...)
108108
l.Log().Debugf("resolved destination with magic shortcut path: '%s'", destPathResolved)
109-
return filepath.Join(destPathResolved), nil
109+
return path.Join(destPathResolved), nil
110110
}
111111

112112
return "", fmt.Errorf("destination can be only absolute path or starts with predefined shortcut path. Could not resolve destination file path: %s", destPath)

0 commit comments

Comments
 (0)