#265: fixed No such file or directory

This commit is contained in:
Vokhmin Alexey V 2013-08-15 16:35:43 +04:00
parent 6ffdddf48b
commit b88f73a4ca
1 changed files with 1 additions and 1 deletions

View File

@ -292,7 +292,7 @@ class Project < ActiveRecord::Base
self.name = old_name self.name = old_name
old_path = path old_path = path
self.name = new_name 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) pull_requests_old_path = File.join(APP_CONFIG['git_path'], 'pull_requests', owner.uname, old_name)
if Dir.exists?(pull_requests_old_path) if Dir.exists?(pull_requests_old_path)