1
0
mirror of https://github.com/astaxie/beego.git synced 2025-07-11 16:51:01 +00:00

fix when delete the commentsRouter.go

This commit is contained in:
astaxie
2014-08-04 17:39:14 +08:00
2 changed files with 4 additions and 1 deletions

View File

@ -158,6 +158,9 @@ func genRouterCode() {
}
func compareFile(pkgRealpath string) bool {
if !utils.FileExists(path.Join(workPath, "routers", "commentsRouter.go")) {
return true
}
if utils.FileExists(path.Join(workPath, lastupdateFilename)) {
content, err := ioutil.ReadFile(path.Join(workPath, lastupdateFilename))
if err != nil {