aboutsummaryrefslogtreecommitdiff
path: root/files.go
diff options
context:
space:
mode:
Diffstat (limited to 'files.go')
-rw-r--r--files.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/files.go b/files.go
index f1a3d6c..2effe6e 100644
--- a/files.go
+++ b/files.go
@@ -9,8 +9,8 @@ func writeFile(postcache PostCache, filename string) error {
data := postcache.Data
var binary []byte
- n, err := base64.StdEncoding.Decode(binary, []byte(data))
- if n == 0 || err != nil {
+ binary, err := base64.StdEncoding.DecodeString(data)
+ if err != nil {
return err
}