absolut path
This commit is contained in:
parent
538af45cf6
commit
7fcd2b4978
2 changed files with 2 additions and 2 deletions
|
@ -105,7 +105,7 @@ func dailyHabitImage(cCtx *cli.Context) error {
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
f, err := os.OpenFile("headmap.png", os.O_WRONLY|os.O_CREATE, 0644)
|
f, err := os.OpenFile("/tmp/headmap.png", os.O_WRONLY|os.O_CREATE, 0644)
|
||||||
defer f.Close()
|
defer f.Close()
|
||||||
err = charts.WriteHeatmap(conf, f)
|
err = charts.WriteHeatmap(conf, f)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
|
@ -114,7 +114,7 @@ func resetDailyTasks(cCtx *cli.Context) error {
|
||||||
return fmt.Errorf("cant marshal data for archiov: %w", err)
|
return fmt.Errorf("cant marshal data for archiov: %w", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
err = os.WriteFile(fmt.Sprintf("%v/%v.json", DATAPATH, time.Now().Format(time.DateOnly)), data, 0744)
|
err = os.WriteFile(fmt.Sprintf("%v/%v.json", DATAPATH, time.Now().Add(-24*time.Hour).Format(time.DateOnly)), data, 0744)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return fmt.Errorf("cant wrote daily habbit file: %w", err)
|
return fmt.Errorf("cant wrote daily habbit file: %w", err)
|
||||||
}
|
}
|
||||||
|
|
Reference in a new issue