From 33c27f61758a927b087afd0601ef798e41121584 Mon Sep 17 00:00:00 2001 From: Ben Radey Date: Thu, 29 Apr 2021 16:33:18 -0400 Subject: [PATCH] replaced resource resolver with symlink version (#585) --- .../pantheon/asciidoctor/extension/PantheonXrefProcessor.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pantheon-bundle/src/main/java/com/redhat/pantheon/asciidoctor/extension/PantheonXrefProcessor.java b/pantheon-bundle/src/main/java/com/redhat/pantheon/asciidoctor/extension/PantheonXrefProcessor.java index d380c103a..1cbd46b0c 100644 --- a/pantheon-bundle/src/main/java/com/redhat/pantheon/asciidoctor/extension/PantheonXrefProcessor.java +++ b/pantheon-bundle/src/main/java/com/redhat/pantheon/asciidoctor/extension/PantheonXrefProcessor.java @@ -1,5 +1,6 @@ package com.redhat.pantheon.asciidoctor.extension; +import com.redhat.pantheon.helper.Symlinks; import com.redhat.pantheon.model.Xref; import com.redhat.pantheon.model.assembly.TableOfContents; import com.redhat.pantheon.model.document.Document; @@ -81,7 +82,7 @@ private String preprocessWithPattern(String line, Pattern pattern, List // Assume it's a relative path to a file in the same repo for now Resource containingFolder = documentVariant.getParentLocale().getParent().getParent(); String targetPath = containingFolder.getPath() + "/" + filepath; - Resource desiredTarget = documentVariant.getResourceResolver().getResource(targetPath); + Resource desiredTarget = Symlinks.resolve(documentVariant.getResourceResolver(), targetPath); if (desiredTarget != null && XREF_ALLOWED_TARGET_TYPES.contains(desiredTarget.getResourceType())) { UUID uuid = UUID.randomUUID();