Explorar el Código

* fixed case aware file searching in case filename also contains a path
(fixes webtbs/tw1279 regression after yesterday's changes)

git-svn-id: trunk@7891 -

Jonas Maebe hace 18 años
padre
commit
fb00c0e253
Se han modificado 1 ficheros con 8 adiciones y 7 borrados
  1. 8 7
      compiler/cfileutl.pas

+ 8 - 7
compiler/cfileutl.pas

@@ -321,7 +321,11 @@ implementation
         Result:=false;
         Result:=false;
         CachedDir:=GetDirectory(ExtractFileDir(AName));
         CachedDir:=GetDirectory(ExtractFileDir(AName));
         if assigned(CachedDir) then
         if assigned(CachedDir) then
-          Result:=CachedDir.FileExistsCaseAware(ExtractFileName(AName),FoundName);
+          begin
+            Result:=CachedDir.FileExistsCaseAware(ExtractFileName(AName),FoundName);
+            if Result then
+              FoundName:=ExtractFilePath(AName)+FoundName;
+          end;
       end;
       end;
 
 
 
 
@@ -505,11 +509,8 @@ implementation
               if allowcache then
               if allowcache then
                 begin
                 begin
                   result:=DirCache.FileExistsCaseAware(FoundFile,fn2);
                   result:=DirCache.FileExistsCaseAware(FoundFile,fn2);
-                  if (result) then
-                    begin
-                      FoundFile:=path+fn2;
-                      exit
-                    end
+                  if result then
+                    exit
                 end
                 end
               else
               else
 {$endif usedircache}
 {$endif usedircache}
@@ -517,7 +518,7 @@ implementation
                   begin
                   begin
                     { don't know the real name in this case }
                     { don't know the real name in this case }
                     result:=true;
                     result:=true;
-                   exit;
+                    exit;
                  end;
                  end;
            end
            end
         else
         else