Skip to content
Snippets Groups Projects
Commit 8b64df58 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets
Browse files

Merge pull request #4067 from bbodenmiller/patch-5

add code comment about backing up folder when restoring
parents 9351a295 d0b04b03
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -15,11 +15,15 @@ module Backup
end
 
def restore
backup_existing_uploads_dir
FileUtils.cp_r(backup_uploads_dir, app_uploads_dir)
end
def backup_existing_uploads_dir
if File.exists?(app_uploads_dir)
FileUtils.mv(app_uploads_dir, Rails.root.join('public', "uploads.#{Time.now.to_i}"))
end
FileUtils.cp_r(backup_uploads_dir, app_uploads_dir)
end
end
end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment