ide: inspect chksum changed: fixed updating cache

This commit is contained in:
mattias 2023-08-03 18:12:46 +02:00
parent 68920c7d01
commit 357928192e
2 changed files with 11 additions and 7 deletions

View File

@ -1325,12 +1325,15 @@ begin
// check excludes
Cache:=DirCache.GetStarCache(StarDir,ctsdStarStar);
for i:=0 to Cache.Listing.Count-1 do begin
FoundFilename:=Cache.Listing.GetSubDirFilename(i);
if (FoundFilename[1]='.')
or (Pos(PathDelim+'.',FoundFilename)>0)
or (Pos('ignore',FoundFilename)>0) then
Fail('Failed to exclude "'+FoundFilename+'"');
if Cache<>nil then begin
Cache.UpdateListing;
for i:=0 to Cache.Listing.Count-1 do begin
FoundFilename:=Cache.Listing.GetSubDirFilename(i);
if (FoundFilename[1]='.')
or (Pos(PathDelim+'.',FoundFilename)>0)
or (Pos('ignore',FoundFilename)>0) then
Fail('Failed to exclude "'+FoundFilename+'"');
end;
end;
finally

View File

@ -239,7 +239,8 @@ begin
if (Dir='') or (not FilenameIsAbsolute(Dir)) then exit;
// search in directory for all files that could be sources or ppu files of this unit
DirCache:=CodeToolBoss.DirectoryCachePool.GetCache(Dir,true,false);
if (DirCache=nil) or (DirCache.Listing=nil) then exit;
if (DirCache=nil) then exit;
DirCache.UpdateListing;
for i:=0 to DirCache.Listing.Count-1 do begin
Filename:=DirCache.Listing.GetFilename(i);
if FilenameExtIn(Filename,['.pas','.pp','.p','.ppu'])