Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLin Jen-Shin <godfat@godfat.org>2018-07-16 18:07:36 +0300
committerLin Jen-Shin <godfat@godfat.org>2018-07-16 18:07:36 +0300
commitafe44451f46e2c470f429b0b6f73e04d49e66f7c (patch)
tree2388a3f85355ca180d2256f9c9299b5bf2dda059 /lib/gitlab/import_export/uploads_saver.rb
parent5c4934ee9486fb5ce7f14581680369010009835b (diff)
parenta73f480715f086e86d781e22d8a76b71c3b0680a (diff)
Merge remote-tracking branch 'upstream/master' into ce-6038-rebase-preserve-merge * upstream/master: (173 commits) Fix invalid link to GitLab.com architecture.md i18n: externalize strings from 'app/views/import' Remove Repository#lookup and unreachable rugged code refactor code based on feedback Trigger rails5 tests either by variable or ref name Fix link in help doc which was linking to old mono-repo, now in its own repo Allow Danger step to fail update webpack to v4.16 Backport logger changes from EE Add the CI Job trigger as the build trigger Remove flaky and redundant expectations use fileuploader dynamic path method in uploads manager and add spec fix typo in uploads manager add small comment to download method in uploads manager refactor uploads manager Update 10.6-to-10.7.md Lazy-load performance bar UI Update .gitlab-ci.yml fixed test to correctly text relative URLs doesnt add query param if source & target projects match Add changelog entry ...
Diffstat (limited to 'lib/gitlab/import_export/uploads_saver.rb')
-rw-r--r--lib/gitlab/import_export/uploads_saver.rb15
1 files changed, 4 insertions, 11 deletions
diff --git a/lib/gitlab/import_export/uploads_saver.rb b/lib/gitlab/import_export/uploads_saver.rb
index 2f08dda55fd..b3f17af5661 100644
--- a/lib/gitlab/import_export/uploads_saver.rb
+++ b/lib/gitlab/import_export/uploads_saver.rb
@@ -9,21 +9,14 @@ module Gitlab
end
def save
- return true unless File.directory?(uploads_path)
-
- copy_files(uploads_path, uploads_export_path)
+ Gitlab::ImportExport::UploadsManager.new(
+ project: @project,
+ shared: @shared
+ ).save
rescue => e
@shared.error(e)
false
end
-
- def uploads_path
- FileUploader.absolute_base_dir(@project)
- end
-
- def uploads_export_path
- File.join(@shared.export_path, 'uploads')
- end
end
end
end