From 3b083c205bf7f5686544c102fe1ecb4ba079e70e Mon Sep 17 00:00:00 2001 From: "Robert S. Gerus" Date: Wed, 23 Dec 2015 10:01:21 +0100 Subject: [PATCH] Fix permisions on downloaded files. --- bot/urltitle.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/bot/urltitle.go b/bot/urltitle.go index 755fa17..a359521 100644 --- a/bot/urltitle.go +++ b/bot/urltitle.go @@ -94,6 +94,11 @@ func fourchanscrape(l string) string { return "error while renaming tempfile" } + err = os.Chmod(dest, 0644) + if err != nil { + return "error while correcting permisions" + } + return path.Join(cfg.LookupString(nil, "FourChanLinkBase"), filename) }