From b451cb9df73b0718e3eaa9325481c84c2bad068b Mon Sep 17 00:00:00 2001 From: Frank Date: Fri, 30 Jul 2010 18:05:51 +0200 Subject: [PATCH] also delete git repo file when db entry is destroyed --- app/controllers/repositories_controller.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/controllers/repositories_controller.rb b/app/controllers/repositories_controller.rb index b6dcc317343..27627e63ac5 100644 --- a/app/controllers/repositories_controller.rb +++ b/app/controllers/repositories_controller.rb @@ -42,6 +42,7 @@ def edit end if request.post? && @repository @repository.attributes = params[:repository] + @repository.url = "#{RAILS_ROOT}/git_repositories/#{@repository.project.identifier}.git" @repository.save end render(:update) do |page| @@ -70,6 +71,7 @@ def committers def destroy @repository.destroy + FileUtils.rm_rf(@repository.url) redirect_to :controller => 'projects', :action => 'settings', :id => @project, :tab => 'repository' end