mirror of https://github.com/goproxyio/goproxy
fix mkdir cacheDir bad file mode
parent
2dfa76928d
commit
0ab15412ae
2
main.go
2
main.go
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue