use find instead of reject in avatar export file

This commit is contained in:
James Lopez 2018-09-11 10:22:34 +02:00
parent 994d91883b
commit 678ceb257e
No known key found for this signature in database
GPG Key ID: 756BF8E9D7C0CF39
1 changed files with 1 additions and 1 deletions

View File

@ -19,7 +19,7 @@ module Gitlab
private
def avatar_export_file
@avatar_export_file ||= Dir["#{avatar_export_path}/**/*"].reject { |f| File.directory?(f) }.first
@avatar_export_file ||= Dir["#{avatar_export_path}/**/*"].find { |f| File.file?(f) }
end
def avatar_export_path