Browse Source

models/repo: clean up repository local copy after rename (#3641)

pull/3855/merge
Unknwon 8 years ago
parent
commit
f7c11a27d0
No known key found for this signature in database
GPG Key ID: FB9F411CDD69BEC1
  1. 2
      gogs.go
  2. 3
      models/repo.go
  3. 2
      templates/.VERSION

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

3
models/repo.go

@ -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
}

2
templates/.VERSION

@ -1 +1 @@
0.9.137.0209
0.9.138.0209
Loading…
Cancel
Save