From 86007e21eb07d75a10198da80df1bb886c519af9 Mon Sep 17 00:00:00 2001 From: Genevieve Warren <24882762+gewarren@users.noreply.github.com> Date: Mon, 6 Apr 2026 15:17:07 -0700 Subject: [PATCH] fix docfx directory bug --- cleanrepo/Repo.cs | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/cleanrepo/Repo.cs b/cleanrepo/Repo.cs index a128e39a..336aa1aa 100644 --- a/cleanrepo/Repo.cs +++ b/cleanrepo/Repo.cs @@ -196,14 +196,16 @@ internal void OutputImageReferences(bool ocrImages = false, bool filteredOcrImag if (ocrImages) { WriteOcrImageRefsToFile(); - } else if (ocrImages && filteredOcrImage) + } + else if (ocrImages && filteredOcrImage) { WriteFilteredOcrImageRefsToFile(); - } else + } + else { WriteImageRefsToFile(); } - + } /// @@ -327,17 +329,13 @@ internal List GetAllRedirects() if (docfx == null) return null; - string? docsetPath = null; - - // If there's more than one docset, choose the one that includes the input directory. if (docfx.build?.content is not null) { foreach (Content entry in docfx.build.content) { - if (entry.src == null) - continue; + string? docsetPath; - if (entry.src.TrimEnd('/') == ".") + if (entry.src == null || entry.src.TrimEnd('/') == ".") docsetPath = DocFxDirectory!.FullName; else docsetPath = Path.GetFullPath(entry.src, DocFxDirectory!.FullName);