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.
This commit is contained in:
2026-02-13 23:16:57 -06:00
parent 87d66c8fe1
commit 672fe24ee9
+1 -2
View File
@@ -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)