Commit 2812e6f1 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Fix removeing project if repo not exists

parent 20a4742e
No related merge requests found
......@@ -88,7 +88,10 @@ module Gitlab
end
def destroy_project(project)
FileUtils.rm_rf(project.repository.path_to_repo)
# do rm-rf only if repository exists
if project.repository
FileUtils.rm_rf(project.repository.path_to_repo)
end
conf.rm_repo(project.path_with_namespace)
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment