From b7cf0ea4b576a690d7549ab13d2766dd264bada7 Mon Sep 17 00:00:00 2001 From: Vasilii Iakliushin Date: Wed, 2 Dec 2020 14:27:45 +0100 Subject: Limit symlink converter scope Contributes to https://gitlab.com/gitlab-org/gitlab/-/issues/214164 We don't want to create symlinks to images located in assets. Only images from /ee/ directory should be replaced by symlinks. --- lib/gitlab/symlinks_converter.rb | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lib') diff --git a/lib/gitlab/symlinks_converter.rb b/lib/gitlab/symlinks_converter.rb index 9ba764ad5..a7cea940d 100644 --- a/lib/gitlab/symlinks_converter.rb +++ b/lib/gitlab/symlinks_converter.rb @@ -17,6 +17,8 @@ module Gitlab items.each do |item| id = item.identifier + next unless id.to_s.start_with?('/ee/') + if EXTENTIONS.include?(id.ext) file_path = File.join(config.fetch(:content_dir), id.to_s) real_path = Pathname.new(file_path).realpath.to_s -- cgit v1.2.3