summaryrefslogtreecommitdiff
path: root/app/services/projects
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-06-03 16:16:27 +0200
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-06-03 16:16:27 +0200
commit53a0ac47344b9b1d93ec36d9e6b41e2394598beb (patch)
tree980b54b212ce8c29f5111a722012f7e6f8484025 /app/services/projects
parent47a95754de18a8f08aa78bf9f20223f263fa8c90 (diff)
downloadgitlab-ce-53a0ac47344b9b1d93ec36d9e6b41e2394598beb.tar.gz
Skip repo removing whem remove user or group
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'app/services/projects')
-rw-r--r--app/services/projects/destroy_service.rb8
1 files changed, 5 insertions, 3 deletions
diff --git a/app/services/projects/destroy_service.rb b/app/services/projects/destroy_service.rb
index 29e8ba347d4..403f419ec50 100644
--- a/app/services/projects/destroy_service.rb
+++ b/app/services/projects/destroy_service.rb
@@ -36,9 +36,11 @@ module Projects
private
def remove_repository(path)
- unless gitlab_shell.exists?(path + '.git')
- return true
- end
+ # Skip repository removal. We use this flag when remove user or group
+ return true if params[:skip_repo] == true
+
+ # There is a possibility project does not have repository or wiki
+ return true unless gitlab_shell.exists?(path + '.git')
new_path = removal_path(path)