Commit 9115a4f92f03265253c976ca789f799832ad766f
1 parent
b53ca0bc
Exists in
master
and in
4 other branches
Remove satellites when moving namespace
Showing
1 changed file
with
9 additions
and
2 deletions
Show diff stats
app/models/namespace.rb
... | ... | @@ -71,8 +71,15 @@ class Namespace < ActiveRecord::Base |
71 | 71 | if File.exists?(new_path) |
72 | 72 | raise "Already exists" |
73 | 73 | end |
74 | - | |
75 | - begin | |
74 | + | |
75 | + | |
76 | + begin | |
77 | + # Remove satellite when moving repo | |
78 | + if path_was.present? | |
79 | + satellites_path = File.join(Gitlab.config.satellites.path, path_was) | |
80 | + FileUtils.rm_r( satellites_path, force: true ) | |
81 | + end | |
82 | + | |
76 | 83 | FileUtils.mv( old_path, new_path ) |
77 | 84 | send_update_instructions |
78 | 85 | @require_update_gitolite = true | ... | ... |