mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-12-01 13:44:06 +01:00
fix #2090
This commit is contained in:
parent
4a6016f5af
commit
f122d0856e
1 changed files with 6 additions and 1 deletions
|
@ -1011,7 +1011,12 @@ func ChangeRepositoryName(u *User, oldRepoName, newRepoName string) (err error)
|
||||||
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…
Reference in a new issue