ref: ebc228579fbf22f53f8fd382264ecf0bf8d47fed
parent: 6e620092908eeb43151002a777da9d2b75414e4f
author: penny <penny@limitedideas.org>
date: Tue Aug 12 17:43:41 EDT 2025
Print error if downloading status with no media
--- a/filehandler.go
+++ b/filehandler.go
@@ -74,6 +74,11 @@
func downloadPostImages(target *mastodon.Status) (files []*os.File, pathnames []string, err error) {+ if len(target.MediaAttachments) == 0 {+ fmt.Printf("Status has no attachments.\n")+ return
+ }
+
for media := range target.MediaAttachments {err, mediafile := downloadImage(target.MediaAttachments[media].URL)
if err != nil {--
⑨