Commit 2812e6f1f5a15a5f56ee61001e4a46cd922e827b
1 parent
20a4742e
Exists in
master
and in
4 other branches
Fix removeing project if repo not exists
Showing
1 changed file
with
4 additions
and
1 deletions
Show diff stats
lib/gitlab/backend/gitolite_config.rb
| ... | ... | @@ -88,7 +88,10 @@ module Gitlab |
| 88 | 88 | end |
| 89 | 89 | |
| 90 | 90 | def destroy_project(project) |
| 91 | - FileUtils.rm_rf(project.repository.path_to_repo) | |
| 91 | + # do rm-rf only if repository exists | |
| 92 | + if project.repository | |
| 93 | + FileUtils.rm_rf(project.repository.path_to_repo) | |
| 94 | + end | |
| 92 | 95 | conf.rm_repo(project.path_with_namespace) |
| 93 | 96 | end |
| 94 | 97 | ... | ... |