mirror of
https://github.com/wahyd4/gitlabhq.git
synced 2026-08-13 14:46:05 +10:00
clarify restore
This commit is contained in:
@@ -15,11 +15,15 @@ module Backup
|
||||
end
|
||||
|
||||
def restore
|
||||
if File.exists?(app_uploads_dir)
|
||||
FileUtils.mv(app_uploads_dir, Rails.root.join('public', "uploads.#{Time.now.to_i}"))
|
||||
end
|
||||
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
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user