diff options
author | clsr <clsr@clsr.net> | 2016-06-16 20:08:12 +0200 |
---|---|---|
committer | clsr <clsr@clsr.net> | 2016-06-16 20:08:12 +0200 |
commit | ce46c90e1964c26111442c780d2c173c46d6ccad (patch) | |
tree | 127e662fb30797d848853f983f29f8768f268af2 | |
parent | 629fcd4f297ffb34b4f3b54326645eabd42ab32c (diff) | |
download | gomf-ce46c90e1964c26111442c780d2c173c46d6ccad.tar.gz gomf-ce46c90e1964c26111442c780d2c173c46d6ccad.zip |
Prevent creation of empty dirs when ran outside of gomf-webv0.1.4
-rw-r--r-- | main.go | 4 | ||||
-rw-r--r-- | website.go | 1 |
2 files changed, 2 insertions, 3 deletions
@@ -53,6 +53,8 @@ func main() { rand.Seed(time.Now().UnixNano()) + initWebsite() + storage = NewStorage("upload", *maxSize) storage.ForbiddenExt = strings.Split(*forbidExt, ",") storage.ForbiddenMime = strings.Split(*forbidMime, ",") @@ -67,8 +69,6 @@ func main() { http.HandleFunc("/grill.php", handleGrill) } - initWebsite() - if uploadUrl == "" { if *listenHttps != "" { if uploadHost != "" { @@ -14,7 +14,6 @@ import ( var templates *template.Template func initWebsite() { - os.MkdirAll("pages", 0755) pages, err := ioutil.ReadDir("pages") if err != nil { panic(err) |