Skip to content

Commit 04347ce

Browse files
committed
Explain workaround and limit it to Windows
Follow-up to duckdb#68
1 parent 701b395 commit 04347ce

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

bindings_extensions_test.go

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package duckdb_go_bindings
22

33
import (
44
"os"
5+
"runtime"
56
"strings"
67
"testing"
78

@@ -28,9 +29,15 @@ func TestOpenSQLiteDB(t *testing.T) {
2829
t.Fail()
2930
}
3031

31-
extDir, err := os.MkdirTemp("", "duckdb-ext-*")
32-
require.NoError(t, err)
33-
SetConfig(config, "extension_directory", extDir)
32+
// Work around a DuckDB v1.5.0 regression where the default extension
33+
// directory is malformed on Windows (https://github.com/duckdb/duckdb/pull/21260).
34+
// Uses os.MkdirTemp instead of t.TempDir() to avoid Windows cleanup failures when DuckDB
35+
// still holds extension file handles.
36+
if runtime.GOOS == "windows" {
37+
extDir, err := os.MkdirTemp("", "duckdb-ext-*")
38+
require.NoError(t, err)
39+
SetConfig(config, "extension_directory", extDir)
40+
}
3441

3542
var db Database
3643
defer Close(&db)

0 commit comments

Comments
 (0)