mirror of https://github.com/gogs/gogs.git
models/repo: clean up repository local copy after rename (#3641)
parent
418dab9b96
commit
f7c11a27d0
2
gogs.go
2
gogs.go
|
@ -16,7 +16,7 @@ import (
|
|||
"github.com/gogits/gogs/modules/setting"
|
||||
)
|
||||
|
||||
const APP_VER = "0.9.137.0209"
|
||||
const APP_VER = "0.9.138.0209"
|
||||
|
||||
func init() {
|
||||
setting.AppVer = APP_VER
|
||||
|
|
|
@ -1228,7 +1228,7 @@ func ChangeRepositoryName(u *User, oldRepoName, newRepoName string) (err error)
|
|||
return fmt.Errorf("GetRepositoryByName: %v", err)
|
||||
}
|
||||
|
||||
// Change repository directory name.
|
||||
// Change repository directory name
|
||||
if err = os.Rename(repo.RepoPath(), RepoPath(u.Name, newRepoName)); err != nil {
|
||||
return fmt.Errorf("rename repository directory: %v", err)
|
||||
}
|
||||
|
@ -1241,6 +1241,7 @@ func ChangeRepositoryName(u *User, oldRepoName, newRepoName string) (err error)
|
|||
RemoveAllWithNotice("Delete repository wiki local copy", repo.LocalWikiPath())
|
||||
}
|
||||
|
||||
RemoveAllWithNotice("Delete repository local copy", repo.LocalCopyPath())
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
|
@ -1 +1 @@
|
|||
0.9.137.0209
|
||||
0.9.138.0209
|
Loading…
Reference in New Issue