From 32706f50f6d0bda80445bb200a9cf6a5c9d172dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Wei=C3=9Fe?= <66256922+daniel-weisse@users.noreply.github.com> Date: Wed, 8 Nov 2023 10:26:02 +0100 Subject: [PATCH] [Windows] cli: fix incorrect filepath separator causing upgrades to fail (#2562) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Daniel Weiße --- internal/file/file.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/internal/file/file.go b/internal/file/file.go index 184ebf2d2..84e0104b2 100644 --- a/internal/file/file.go +++ b/internal/file/file.go @@ -18,7 +18,6 @@ import ( "io" "io/fs" "os" - "path" "path/filepath" "strings" @@ -88,7 +87,7 @@ func (h *Handler) Read(name string) ([]byte, error) { // Write writes the data bytes into the file with the given name. func (h *Handler) Write(name string, data []byte, options ...Option) error { if hasOption(options, OptMkdirAll) { - if err := h.fs.MkdirAll(path.Dir(name), os.ModePerm); err != nil { + if err := h.fs.MkdirAll(filepath.Dir(name), os.ModePerm); err != nil { return err } }