diff --git a/compiler/cfileutl.pas b/compiler/cfileutl.pas
index 2ca2cecb80..10e2cb1f91 100644
--- a/compiler/cfileutl.pas
+++ b/compiler/cfileutl.pas
@@ -1238,7 +1238,7 @@ end;
        Path : TCmdStr;
        found : boolean;
      begin
-       found:=FindFile(FixFileName(ChangeFileExt(bin,source_info.exeext)),'.;'+exepath,allowcache,foundfile);
+       found:=FindFile(FixFileName(ChangeFileExt(bin,source_info.exeext)),exepath,allowcache,foundfile);
        if not found then
         begin
 {$ifdef macos}