From 695ff633ced4a224d1021c9e787389169f63c292 Mon Sep 17 00:00:00 2001
From: Las Zenow <zenow@tormail.org>
Date: Thu, 16 Aug 2012 10:06:41 +0200
Subject: [PATCH] Clean up spaces

---
 upload/upload.go | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/upload/upload.go b/upload/upload.go
index b987ad5..fe43881 100644
--- a/upload/upload.go
+++ b/upload/upload.go
@@ -73,6 +73,7 @@ func getCover(e *epub.Epub, path string) (string, string) {
 				res[1] = res[1][3:]
 				url = strings.Join(urlPart[:len(urlPart)-2], "/")
 			}
+			res[1] = strings.Replace(res[1], "%20", " ", -1)
 			if url == "" {
 				url = res[1]
 			} else {
@@ -86,6 +87,7 @@ func getCover(e *epub.Epub, path string) (string, string) {
 			if n != 0 {
 				return resize(folder, path, res[2])
 			}
+			panic(url)
 			os.Remove(imgPath)
 		}
 		txt, err = it.Next()