save this in ~/.config/forge

This commit is contained in:
Jeff Carr 2025-01-30 23:43:24 -06:00
parent fb91818c5f
commit 8329c71b08
1 changed files with 2 additions and 2 deletions

View File

@ -58,7 +58,7 @@ func savePatchsets(psets *forgepb.Patchsets) error {
log.Info("protobuf.Marshal() failed:", err)
return err
}
fullpath := filepath.Join(me.forge.GetGoSrc(), "patchsets.pb")
fullpath := filepath.Join(me.forge.GetConfigDir(), "patchsets.pb")
var pfile *os.File
pfile, err = os.OpenFile(fullpath, os.O_WRONLY|os.O_CREATE|os.O_TRUNC, 0644)
if err != nil {
@ -71,7 +71,7 @@ func savePatchsets(psets *forgepb.Patchsets) error {
}
func openPatchsets() (*forgepb.Patchsets, error) {
fullpath := filepath.Join(me.forge.GetGoSrc(), "patchsets.pb")
fullpath := filepath.Join(me.forge.GetConfigDir(), "patchsets.pb")
data, err := os.ReadFile(fullpath)
if err != nil {
log.Info("Patchsets open failed:", err, fullpath)