From 41acd3a422be55515cfd3af5d8e3bd05166b4f1c Mon Sep 17 00:00:00 2001 From: Floriaan Post Date: Wed, 26 Mar 2025 21:58:34 +0100 Subject: [PATCH] Fix for Windows codegen --- embed_util/file_list.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/embed_util/file_list.go b/embed_util/file_list.go index eb2f8070..5a709331 100644 --- a/embed_util/file_list.go +++ b/embed_util/file_list.go @@ -48,7 +48,7 @@ func buildFileListFromDir(dir string) (*fileList, error) { } fle := fileListEntry{ - Name: relPath, + Name: filepath.ToSlash(relPath), // Fix for Windows, for an fs.FS, you should open files with forward slashes Size: info.Size(), Mode: info.Mode(), } @@ -92,7 +92,7 @@ func buildFileListFromFs(embedFs fs.FS) (*fileList, error) { } fle := fileListEntry{ - Name: path, + Name: filepath.ToSlash(path), // Fix for Windows, for an fs.FS, you should open files with forward slashes Size: info.Size(), Mode: info.Mode() | 0o600, }