Fix: create multiple level path (#431)

This commit is contained in:
Loyalsoldier 2021-03-03 18:41:23 +08:00 committed by GitHub
parent aba4e341f7
commit 584886fb9e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -329,7 +329,10 @@ func main() {
// Create output directory if not exist
if _, err := os.Stat(*outputDir); os.IsNotExist(err) {
os.Mkdir(*outputDir, 0755)
if mkErr := os.MkdirAll(*outputDir, 0755); mkErr != nil {
fmt.Println("Failed: ", mkErr)
os.Exit(1)
}
}
protoList := new(router.GeoSiteList)