fix mkdir cacheDir bad file mode

pull/17/head
shengxiang 2018-11-24 21:01:14 +08:00 committed by kun
parent 2dfa76928d
commit 0ab15412ae
1 changed files with 1 additions and 1 deletions

View File

@ -33,7 +33,7 @@ func main() {
cacheDir = filepath.Join(gp[0], "pkg", "mod", "cache", "download")
if _, err := os.Stat(cacheDir); os.IsNotExist(err) {
fmt.Fprintf(os.Stdout, "goproxy: %s cache dir is not exist. %s\n", time.Now().Format("2006-01-02 15:04:05"), cacheDir)
os.MkdirAll(cacheDir, 0644)
os.MkdirAll(cacheDir, 0755)
}
http.Handle("/", mainHandler(http.FileServer(http.Dir(cacheDir))))
err := http.ListenAndServe(listen, nil)