2016-05-19 13:36:20 +00:00
|
|
|
module Gitlab
|
|
|
|
module ImportExport
|
|
|
|
class UploadsRestorer < UploadsSaver
|
2016-06-13 11:34:36 +00:00
|
|
|
def restore
|
2016-05-19 13:36:20 +00:00
|
|
|
return true unless File.directory?(uploads_export_path)
|
|
|
|
|
|
|
|
copy_files(uploads_export_path, uploads_path)
|
|
|
|
rescue => e
|
|
|
|
@shared.error(e)
|
|
|
|
false
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|