summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorGrzegorz Bizon <grzegorz@gitlab.com>2018-09-11 10:39:36 +0000
committerGrzegorz Bizon <grzegorz@gitlab.com>2018-09-11 10:39:36 +0000
commitc56f2b96159afaf6f1e0831d0e7a756a40568cab (patch)
tree9070e9f1d9b63733e7d0ecd57bd7aeca242bdc85 /lib
parentb9ea4e35ac679a87ea16ca01a5f02bd96b3b16c3 (diff)
parent678ceb257ef829377c197ef368ea8e1b7fce9c4e (diff)
downloadgitlab-ce-c56f2b96159afaf6f1e0831d0e7a756a40568cab.tar.gz
Merge branch '51318-project-export-broken-when-avatar-is-set' into 'master'
Resolve "Project export broken when avatar is set" Closes #51318 See merge request gitlab-org/gitlab-ce!21649
Diffstat (limited to 'lib')
-rw-r--r--lib/gitlab/import_export/avatar_restorer.rb2
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 ded05f73cf8..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}/**/*"].first
+ @avatar_export_file ||= Dir["#{avatar_export_path}/**/*"].find { |f| File.file?(f) }
end
def avatar_export_path