Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-docs.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorVasilii Iakliushin <viakliushin@gitlab.com>2020-12-02 16:27:45 +0300
committerVasilii Iakliushin <viakliushin@gitlab.com>2020-12-02 16:27:45 +0300
commitb7cf0ea4b576a690d7549ab13d2766dd264bada7 (patch)
tree43702a2dd5ef4c0d083e9c8b6e4cd2bd8656ca16 /lib
parent3fd83876189d9dae6c956093308168928d97a82d (diff)
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.
Diffstat (limited to 'lib')
-rw-r--r--lib/gitlab/symlinks_converter.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/gitlab/symlinks_converter.rb b/lib/gitlab/symlinks_converter.rb
index 9ba764ad..a7cea940 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