shithub: hell

Download patch

ref: c31ba4559ca9f89e9aad8ff689207cd6548c50e4
parent: 5b1c32f9feba920e2d0a568de897bcbd0d64f4b9
author: penny <penny@limitedideas.org>
date: Fri Oct 3 21:02:17 EDT 2025

fiddle with loadFile

--- a/filehandler.go
+++ b/filehandler.go
@@ -157,13 +157,13 @@
 	attachments []*mastodon.Attachment
 }
 
-// Return a byte array and error given a filepath
+// Return a *os.File and error given a filepath
 // Expands ~ and environmental variables
 func loadFile(path string) (*os.File, error) {
 	path = expandDir(path)
 	file, err := os.Open(path)
 	if err != nil {
-		return nil, fmt.Errorf("read error: %s: %s", path, err)
+		return nil, fmt.Errorf("error opening file: %s", path, err)
 	}
 	return file, nil
 }
--