From 672fe24ee99debf4a394fff7eec55f17b0e44476 Mon Sep 17 00:00:00 2001 From: Logan Date: Fri, 13 Feb 2026 23:16:49 -0600 Subject: [PATCH] fix: use path.Join for embed.FS paths to fix Windows build filepath.Join uses OS-specific separators (backslash on Windows), but embed.FS always uses forward slashes. This caused schema file lookups to fail during Wails binding generation on Windows. --- backend/database/database.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/backend/database/database.go b/backend/database/database.go index 3eac98b..ee13d9c 100644 --- a/backend/database/database.go +++ b/backend/database/database.go @@ -9,7 +9,6 @@ import ( "io/fs" "log/slog" "path" - "path/filepath" _ "modernc.org/sqlite" // Register sqlite driver. "yellowjacket/backend/database/sql/sqlcgen" @@ -61,7 +60,7 @@ func NewDB(logger *slog.Logger) (*DB, error) { for _, dirEntry := range dirEntries { if !dirEntry.IsDir() { - filePath := filepath.Join("sql/schemas", dirEntry.Name()) + filePath := path.Join("sql/schemas", dirEntry.Name()) sqlContent, err := fs.ReadFile(schemas, filePath) if err != nil { return nil, fmt.Errorf("could not read file %s: %w", filePath, err)