summaryrefslogtreecommitdiff
path: root/app/services/projects/destroy_service.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/services/projects/destroy_service.rb')
-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)