fix deleting non-existing repo

This commit is contained in:
Dmitriy Zaporozhets 2013-01-25 14:35:46 +02:00
parent c78ede3165
commit d14069e333

View file

@ -87,7 +87,9 @@ module Gitlab
end
def destroy_project(project)
FileUtils.rm_rf(project.repository.path_to_repo)
if project.repository
FileUtils.rm_rf(project.repository.path_to_repo)
end
conf.rm_repo(project.path_with_namespace)
end