diff options
author | James Lopez <james@jameslopez.es> | 2018-09-11 10:22:34 +0200 |
---|---|---|
committer | James Lopez <james@jameslopez.es> | 2018-09-11 10:22:34 +0200 |
commit | 678ceb257ef829377c197ef368ea8e1b7fce9c4e (patch) | |
tree | 43fb44ab6c2646a372446ce7066d6a49cb826fbb | |
parent | 994d91883b0c68524668eb2c475fd5317fca5f9e (diff) | |
download | gitlab-ce-678ceb257ef829377c197ef368ea8e1b7fce9c4e.tar.gz |
use find instead of reject in avatar export file
-rw-r--r-- | lib/gitlab/import_export/avatar_restorer.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/gitlab/import_export/avatar_restorer.rb b/lib/gitlab/import_export/avatar_restorer.rb index 264a9a41ff0..17796430811 100644 --- a/lib/gitlab/import_export/avatar_restorer.rb +++ b/lib/gitlab/import_export/avatar_restorer.rb @@ -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 |