Skip to content

Commit

Permalink
fix: use tmp dir to store (#69)
Browse files Browse the repository at this point in the history
  • Loading branch information
hantmac authored Aug 17, 2023
1 parent e082970 commit 0aa66ff
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion con_batch.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ func (dc *DatabendConn) prepareBatch(ctx context.Context, query string) (ldriver
if len(matches) < 2 {
return nil, errors.New("cannot get table name from query")
}
csvFileName := fmt.Sprintf("%s.csv", uuid.NewString())
csvFileName := fmt.Sprintf("%s/%s.csv", os.TempDir(), uuid.NewString())

csvFile, err := os.OpenFile(csvFileName, os.O_RDWR|os.O_APPEND|os.O_CREATE, 0666)
if err != nil {
Expand Down

0 comments on commit 0aa66ff

Please sign in to comment.