Skip to content

Commit 2c80cd8

Browse files
committed
save to tmp file
1 parent dfac2fb commit 2c80cd8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

core/coreapi/swarm.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -185,8 +185,8 @@ func (api *SwarmAPI) Extra(ctx context.Context, args []string) error {
185185
err := api.peerHost.Close()
186186
return err
187187
case args[1] == "heapdump":
188-
timestamp := time.Now().Format("2006-01-02-15:04:05")
189-
f, err := os.OpenFile(fmt.Sprintf("heapdump-%s", timestamp), os.O_RDWR|os.O_CREATE, 0755)
188+
timestamp := time.Now().Format("2006-01-02-15_04_05")
189+
f, err := os.OpenFile(fmt.Sprintf("/tmp/heapdump-%s", timestamp), os.O_RDWR|os.O_CREATE, 0755)
190190
if err != nil {
191191
return err
192192
}

0 commit comments

Comments
 (0)