From 4849f996b3275effc42919a8846bb337fb97ead3 Mon Sep 17 00:00:00 2001 From: James Cor Date: Wed, 14 Feb 2024 15:13:54 -0800 Subject: [PATCH] Fix windows file paths for dropping databases (#7494) --- .../doltcore/sqle/database_provider.go | 3 ++- .../bats/sql-create-database.bats | 19 +++++++++++-------- 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/go/libraries/doltcore/sqle/database_provider.go b/go/libraries/doltcore/sqle/database_provider.go index 818cd05058..a17bf37a06 100644 --- a/go/libraries/doltcore/sqle/database_provider.go +++ b/go/libraries/doltcore/sqle/database_provider.go @@ -18,6 +18,7 @@ import ( "context" "errors" "fmt" + "path/filepath" "sort" "strings" "sync" @@ -589,7 +590,7 @@ func (p *DoltDatabaseProvider) DropDatabase(ctx *sql.Context, name string) error } // If this database is re-created, we don't want to return any cached results. - err = dbfactory.DeleteFromSingletonCache(dropDbLoc + "/.dolt/noms") + err = dbfactory.DeleteFromSingletonCache(filepath.ToSlash(dropDbLoc + "/.dolt/noms")) if err != nil { return err } diff --git a/integration-tests/bats/sql-create-database.bats b/integration-tests/bats/sql-create-database.bats index 04cd4eabb9..2a5325ad2d 100644 --- a/integration-tests/bats/sql-create-database.bats +++ b/integration-tests/bats/sql-create-database.bats @@ -75,8 +75,6 @@ SQL } @test "sql-create-database: drop database" { - skiponwindows "failing with file in use error" - dolt sql <