From 4b30b5c0917af9b1c77c6c5edd26a4058d052f41 Mon Sep 17 00:00:00 2001 From: Las Zenow Date: Sun, 9 Sep 2012 03:16:43 +0200 Subject: [PATCH] If the file exists didn't work --- admin.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/admin.go b/admin.go index 0ddc5e3..56beaa6 100644 --- a/admin.go +++ b/admin.go @@ -145,7 +145,7 @@ func ValidFileName(path string, title string, extension string) string { file := path + "/" + title + extension _, err := os.Stat(file) for i := 0; err == nil; i++ { - file := path + "/" + title + "_" + strconv.Itoa(i) + extension + file = path + "/" + title + "_" + strconv.Itoa(i) + extension _, err = os.Stat(file) } return file