summaryrefslogtreecommitdiff
path: root/config.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2025-09-13 05:33:31 -0500
committerJeff Carr <[email protected]>2025-09-13 05:33:31 -0500
commit2a47f1e547d2cda3d85d5e6c8c78a663b139fc9f (patch)
tree430df61927de88fcc1be5dfeb7a05e224b30661f /config.go
parent719287c3bfa349c74c2ce86b01299c97169ec3a8 (diff)
cleaning up obscure git casesv0.0.127
Diffstat (limited to 'config.go')
-rw-r--r--config.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/config.go b/config.go
index f110ace..9e10d20 100644
--- a/config.go
+++ b/config.go
@@ -19,6 +19,11 @@ func (all *Repos) ConfigSave(fname string) error {
return errors.New("gitpb.ConfigSave() repos == nil")
}
+ if _, s := filepath.Split(fname); s != "repos.pb" {
+ log.Infof("ConfigSave() filename '%s' invalid\n", fname)
+ return log.Errorf("ConfigSave() filename '%s' invalid\n", fname)
+ }
+
data, err := all.Marshal()
if err != nil {
log.Info("gitpb proto.Marshal() failed len", len(data), err)