summaryrefslogtreecommitdiffstats
path: root/routers/repo/setting.go
diff options
context:
space:
mode:
Diffstat (limited to 'routers/repo/setting.go')
-rw-r--r--routers/repo/setting.go9
1 files changed, 9 insertions, 0 deletions
diff --git a/routers/repo/setting.go b/routers/repo/setting.go
index c9236a5331..c5772dca52 100644
--- a/routers/repo/setting.go
+++ b/routers/repo/setting.go
@@ -105,6 +105,15 @@ func SettingsPost(ctx *context.Context, form auth.RepoSettingForm) {
}
if repo.IsMirror {
+ if isNameChanged {
+ var err error
+ ctx.Repo.Mirror, err = models.GetMirror(repo.ID)
+ if err != nil {
+ ctx.Handle(500, "RefreshRepositoryMirror", err)
+ return
+ }
+ }
+
if form.Interval > 0 {
ctx.Repo.Mirror.EnablePrune = form.EnablePrune
ctx.Repo.Mirror.Interval = form.Interval