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:
-rw-r--r--lib/gitlab/background_migration/prepare_unhashed_uploads.rb6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/gitlab/background_migration/prepare_unhashed_uploads.rb b/lib/gitlab/background_migration/prepare_unhashed_uploads.rb
index 982c0ff5320..ce488542df9 100644
--- a/lib/gitlab/background_migration/prepare_unhashed_uploads.rb
+++ b/lib/gitlab/background_migration/prepare_unhashed_uploads.rb
@@ -59,9 +59,11 @@ module Gitlab
end
def build_find_command(search_dir)
- cmd = ['find', search_dir, '-type', 'f', '!', '-path', "#{UPLOAD_DIR}/@hashed/*", '!', '-path', "#{UPLOAD_DIR}/tmp/*", '-print0']
+ hashed_path = "#{UPLOAD_DIR}/@hashed/*"
+ tmp_path = "#{UPLOAD_DIR}/tmp/*"
+ cmd = %W[find #{search_dir} -type f ! ( -path #{hashed_path} -prune ) ! ( -path #{tmp_path} -prune ) -print0]
- ['ionice', '-c', 'Idle'] + cmd if ionice_is_available?
+ %w[ionice -c Idle] + cmd if ionice_is_available?
cmd
end