Fix previous filename
This commit is contained in:
parent
8e88e1489b
commit
47790e7ef1
1 changed files with 1 additions and 1 deletions
|
@ -65,7 +65,7 @@ namespace :cloudstorage do
|
||||||
unless content.current_path.nil?
|
unless content.current_path.nil?
|
||||||
if File.exist?(File.dirname(content.current_path) + '/uploaded')
|
if File.exist?(File.dirname(content.current_path) + '/uploaded')
|
||||||
previous_filename = File.read(File.dirname(content.current_path) + '/uploaded')
|
previous_filename = File.read(File.dirname(content.current_path) + '/uploaded')
|
||||||
entry.update_column(c == Procedure ? :logo : :content, filename)
|
entry.update_column(c == Procedure ? :logo : :content, previous_filename)
|
||||||
puts "restoring #{content.current_path} db data to #{previous_filename}"
|
puts "restoring #{content.current_path} db data to #{previous_filename}"
|
||||||
FileUtils.rm(File.dirname(content.current_path) + '/uploaded')
|
FileUtils.rm(File.dirname(content.current_path) + '/uploaded')
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue