Skip to content

Commit

Permalink
save directly to /tmp
Browse files Browse the repository at this point in the history
Signed-off-by: hillium <[email protected]>
  • Loading branch information
YuJuncen committed Sep 9, 2024
1 parent e183b20 commit 35c734a
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions br/pkg/storage/batch.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import (
"fmt"
"io"
"os"
"path"
"sync"

"github.com/pingcap/errors"
Expand Down Expand Up @@ -57,8 +56,7 @@ func JSONEffects(es []Effect, output io.Writer) error {
}

func SaveJSONEffectsToTmp(es []Effect) (string, error) {
// Save the json to a subdir so user can redirect the output path by symlinking...
tmp, err := os.CreateTemp(path.Join(os.TempDir(), "tidb_br"), "br-effects-*.json")
tmp, err := os.CreateTemp(os.TempDir(), "br-effects-*.json")
if err != nil {
return "", errors.Trace(err)
}
Expand Down

0 comments on commit 35c734a

Please sign in to comment.