[Windows] cli: fix incorrect filepath separator causing upgrades to fail (#2562)

Signed-off-by: Daniel Weiße <dw@edgeless.systems>
This commit is contained in:
Daniel Weiße 2023-11-08 10:26:02 +01:00 committed by GitHub
parent 7eb28e4f6e
commit 32706f50f6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -18,7 +18,6 @@ import (
"io" "io"
"io/fs" "io/fs"
"os" "os"
"path"
"path/filepath" "path/filepath"
"strings" "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. // Write writes the data bytes into the file with the given name.
func (h *Handler) Write(name string, data []byte, options ...Option) error { func (h *Handler) Write(name string, data []byte, options ...Option) error {
if hasOption(options, OptMkdirAll) { 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 return err
} }
} }