From b88f73a4ca1cd6fd154068795dfccfd1ca73ee92 Mon Sep 17 00:00:00 2001 From: Vokhmin Alexey V Date: Thu, 15 Aug 2013 16:35:43 +0400 Subject: [PATCH] #265: fixed No such file or directory --- app/models/project.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/project.rb b/app/models/project.rb index bbccd9552..bdcb95feb 100644 --- a/app/models/project.rb +++ b/app/models/project.rb @@ -292,7 +292,7 @@ class Project < ActiveRecord::Base self.name = old_name old_path = path self.name = new_name - FileUtils.mv old_path, new_path, :force => true + FileUtils.mv old_path, new_path, :force => true if Dir.exists?(old_path) pull_requests_old_path = File.join(APP_CONFIG['git_path'], 'pull_requests', owner.uname, old_name) if Dir.exists?(pull_requests_old_path)