mirror of
https://github.com/gogs/gogs.git
synced 2025-12-21 07:39:59 +01:00
models/repo: clean up repository local copy after rename (#3641)
This commit is contained in:
2
gogs.go
2
gogs.go
@@ -16,7 +16,7 @@ import (
|
|||||||
"github.com/gogits/gogs/modules/setting"
|
"github.com/gogits/gogs/modules/setting"
|
||||||
)
|
)
|
||||||
|
|
||||||
const APP_VER = "0.9.137.0209"
|
const APP_VER = "0.9.138.0209"
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
setting.AppVer = APP_VER
|
setting.AppVer = APP_VER
|
||||||
|
|||||||
@@ -1228,7 +1228,7 @@ func ChangeRepositoryName(u *User, oldRepoName, newRepoName string) (err error)
|
|||||||
return fmt.Errorf("GetRepositoryByName: %v", err)
|
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 {
|
if err = os.Rename(repo.RepoPath(), RepoPath(u.Name, newRepoName)); err != nil {
|
||||||
return fmt.Errorf("rename repository directory: %v", err)
|
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 wiki local copy", repo.LocalWikiPath())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
RemoveAllWithNotice("Delete repository local copy", repo.LocalCopyPath())
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
0.9.137.0209
|
0.9.138.0209
|
||||||
Reference in New Issue
Block a user