Fix removeing project if repo not exists

This commit is contained in:
Dmitriy Zaporozhets 2013-01-25 13:47:54 +02:00
parent 20a4742efd
commit 2812e6f1f5

View file

@ -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