From 71266a7b92409d39516c4412a99ab2d34f8a9b08 Mon Sep 17 00:00:00 2001 From: Sun Serega Date: Thu, 9 May 2024 12:12:02 +0200 Subject: [PATCH] (the rest of the fix) --- Compiler/Compiler.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Compiler/Compiler.cs b/Compiler/Compiler.cs index 197efbc2d..bcabbb7cb 100644 --- a/Compiler/Compiler.cs +++ b/Compiler/Compiler.cs @@ -2744,7 +2744,7 @@ namespace PascalABCCompiler else if (FindFileWithExtensionInDirs(fileName, out _, currentPath) is string resultFileName1) fileNameWithPriority = Tuple.Create(resultFileName1, 1); - else if (CompilerOptions.OutputDirectory != project.Path && FindFileWithExtensionInDirs(Path.GetFileName(fileName), out _, CompilerOptions.OutputDirectory) is string resultFileName2) + else if (CompilerOptions.OutputDirectory != CompilerOptions.SourceFileDirectory && FindFileWithExtensionInDirs(Path.GetFileName(fileName), out _, CompilerOptions.OutputDirectory) is string resultFileName2) fileNameWithPriority = Tuple.Create(resultFileName2, 2); else if (FindFileWithExtensionInDirs(fileName, out var dirIndex, CompilerOptions.SearchDirectories.ToArray()) is string resultFileName3) fileNameWithPriority = Tuple.Create(resultFileName3, 3 + dirIndex);