diff options
Diffstat (limited to 'lib/gitlab/import_export/uploads_restorer.rb')
-rw-r--r-- | lib/gitlab/import_export/uploads_restorer.rb | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/lib/gitlab/import_export/uploads_restorer.rb b/lib/gitlab/import_export/uploads_restorer.rb new file mode 100644 index 00000000000..df19354b76e --- /dev/null +++ b/lib/gitlab/import_export/uploads_restorer.rb @@ -0,0 +1,14 @@ +module Gitlab + module ImportExport + class UploadsRestorer < UploadsSaver + def restore + 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 |