summaryrefslogtreecommitdiff
path: root/save.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2025-10-17 01:38:38 -0500
committerJeff Carr <[email protected]>2025-10-17 01:38:38 -0500
commit5579498720c5c1e0cdf31f97f7ad31dfe9dbf0aa (patch)
treef5dea6f7e4bc605358b5bb6ee22ef7c2cffafe37 /save.go
parentc14367731106c50ff790c5eb4e0cdedc32f0ddd1 (diff)
tweaks on config load. more smarters than befores
Diffstat (limited to 'save.go')
-rw-r--r--save.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/save.go b/save.go
index f926a31..d257649 100644
--- a/save.go
+++ b/save.go
@@ -94,6 +94,11 @@ func saveTEXT(pb proto.Message, header string) error {
if err != nil {
return err
}
+ fullname = strings.TrimSpace(fullname)
+ if fullname == "" {
+ return fmt.Errorf("saveTEXT() pb.Filename was blank")
+ }
+
if !strings.HasSuffix(fullname, ".text") {
// todo: append .text here?
return fmt.Errorf("not .text file: %s", fullname)