fix: 1.修正了在非根目录下无法创建文件夹的bug。2.修正了监听ipv6地址时打印地址错误的bug
This commit is contained in:
1 parent
71669aa380
commit
817603cade
1 file changed
+7
-1
@@ -27,7 +27,7 @@ func main() {
|
|||||||
|
|
||||||
router.GET("/query", api.QueryHandler(fsOperateEventCenter))
|
router.GET("/query", api.QueryHandler(fsOperateEventCenter))
|
||||||
router.GET("/get/*path", api.GetHandler)
|
router.GET("/get/*path", api.GetHandler)
|
||||||
router.POST("/mkdir", api.MkdirHandler)
|
router.POST("/mkdir/*path", api.MkdirHandler)
|
||||||
router.POST("/upload/*path", api.UploadHandler)
|
router.POST("/upload/*path", api.UploadHandler)
|
||||||
router.POST("/cut/*path", api.CutHandler(fsOperateEventCenter))
|
router.POST("/cut/*path", api.CutHandler(fsOperateEventCenter))
|
||||||
router.POST("/copy/*path", api.CopyHandler(fsOperateEventCenter))
|
router.POST("/copy/*path", api.CopyHandler(fsOperateEventCenter))
|
||||||
@@ -67,6 +67,12 @@ func printListeningAddresses(port string) {
|
|||||||
if strings.Contains(addr, "%") {
|
if strings.Contains(addr, "%") {
|
||||||
addr = strings.Split(addr, "%")[0]
|
addr = strings.Split(addr, "%")[0]
|
||||||
}
|
}
|
||||||
|
if strings.Contains(addr, ":") {
|
||||||
|
// IPv6 address
|
||||||
|
fmt.Printf(" ➜ Network: http://[%s]%s\n", addr, port)
|
||||||
|
} else {
|
||||||
|
// IPv4 address
|
||||||
fmt.Printf(" ➜ Network: http://%s%s\n", addr, port)
|
fmt.Printf(" ➜ Network: http://%s%s\n", addr, port)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
Reference in new issue
Block a user