File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change 11import { query , Session } from "." ;
22
33// Create a new session instance
4- const session = new Session ( "/ tmp" ) ;
4+ const session = new Session ( "./chdb-bun- tmp" ) ;
55var result ;
66
77// Test standalone query
Original file line number Diff line number Diff line change 11import { dlopen , FFIType } from "bun:ffi" ;
2- import fs from "fs" ;
2+ import { rmdirSync , mkdtempSync } from 'fs' ;
33
44const path = `chdb_bun.so` ;
55
@@ -39,7 +39,7 @@ class Session {
3939 constructor ( path : string = "" ) {
4040 if ( path === "" ) {
4141 // Create a temporary directory
42- this . path = fs . mkdtempSync ( "tmp-" ) ;
42+ this . path = mkdtempSync ( "tmp-" ) ;
4343 this . isTemp = true ;
4444 } else {
4545 this . path = path ;
@@ -49,7 +49,7 @@ class Session {
4949
5050 // Cleanup method to delete the temporary directory
5151 cleanup ( ) {
52- fs . rmdirSync ( this . path , { recursive : true } ) ;
52+ rmdirSync ( this . path , { recursive : true , force : true } ) ;
5353 }
5454}
5555
You can’t perform that action at this time.
0 commit comments