diff --git a/src/GitLink/Linker.cs b/src/GitLink/Linker.cs index babf439..a2169e0 100644 --- a/src/GitLink/Linker.cs +++ b/src/GitLink/Linker.cs @@ -116,9 +116,11 @@ public static class Linker try { Repository repo = repository.Value; - repoSourceFiles = sourceFiles - .Where(f => !f.StartsWithIgnoreCase(options.IntermediateOutputPath)) - .ToDictionary(e => e, e => repo.GetNormalizedPath(e)); + + var files = string.IsNullOrEmpty(options.IntermediateOutputPath) ? + sourceFiles : sourceFiles.Where(f => !f.StartsWithIgnoreCase(options.IntermediateOutputPath)); + + repoSourceFiles = files.ToDictionary(e => e, e => repo.GetNormalizedPath(e)); } catch (RepositoryNotFoundException) { @@ -310,4 +312,4 @@ private static string ReplaceSlashes(IProvider provider, string relativePathForU return relativePathForUrl; } } -} \ No newline at end of file +}