Browse Source

--- Merging r14835 into '.':
U compiler/utils/fpc.pp

# revisions: 14835
------------------------------------------------------------------------
r14835 | florian | 2010-01-31 17:48:18 +0100 (Sun, 31 Jan 2010) | 2 lines
Changed paths:
M /trunk/compiler/utils/fpc.pp

* don't search use extrapath for searching ppc* if extrapath is empty because this might find undesired compilers in the current directory

------------------------------------------------------------------------

git-svn-id: branches/fixes_2_4@14987 -

marco 15 years ago
parent
commit
135d2f1c57
1 changed files with 4 additions and 1 deletions
  1. 4 1
      compiler/utils/fpc.pp

+ 4 - 1
compiler/utils/fpc.pp

@@ -86,7 +86,10 @@ program fpc;
         extrapath:=extrapath+DirectorySeparator;
         extrapath:=extrapath+DirectorySeparator;
       { get path of fpc.exe }
       { get path of fpc.exe }
       path:=splitpath(paramstr(0));
       path:=splitpath(paramstr(0));
-      if FileExists(extrapath+ppcbin) then
+      { don't try with an empty extra patch, this might have strange results
+        if the current directory contains a compiler
+      }
+      if (extrapath<>'') and FileExists(extrapath+ppcbin) then
        begin
        begin
          ppcbin:=extrapath+ppcbin;
          ppcbin:=extrapath+ppcbin;
          findexe:=true;
          findexe:=true;