Browse Source

fix #2090

tags/v0.9.99
Unknwon 8 years ago
parent
commit
f122d0856e
1 changed files with 6 additions and 1 deletions
  1. 6
    1
      models/repo.go

+ 6
- 1
models/repo.go View File

if err = os.Rename(RepoPath(u.Name, oldRepoName), RepoPath(u.Name, newRepoName)); err != nil { if err = os.Rename(RepoPath(u.Name, oldRepoName), RepoPath(u.Name, newRepoName)); err != nil {
return fmt.Errorf("rename repository directory: %v", err) return fmt.Errorf("rename repository directory: %v", err)
} }
return os.Rename(WikiPath(u.Name, oldRepoName), WikiPath(u.Name, newRepoName))

wikiPath := WikiPath(u.Name, oldRepoName)
if com.IsExist(wikiPath) {
err = os.Rename(WikiPath(u.Name, oldRepoName), WikiPath(u.Name, newRepoName))
}
return err
} }


func getRepositoriesByForkID(e Engine, forkID int64) ([]*Repository, error) { func getRepositoriesByForkID(e Engine, forkID int64) ([]*Repository, error) {

Loading…
Cancel
Save