anchor.diff:      fScanning := False;
       if Assigned(fOnComplete) then
         fOnComplete(Self);
  +  finally
  +    Unlock;
  +  end;
  +end;
  +
  +
  +//Scan was terminated
  +//No need to resort since that was done in last MapAdd event
  +procedure TKMapsCollection.ScanTerminate(Sender: TObject);
  +begin
  +  Lock;
  +  try
  +    fScanning := False;
     finally
       Unlock;
     end;
  
positive.code:     procedure Clear;
      procedure MapAdd(aMap: TKMapInfo);
      procedure MapAddDone(Sender: TObject);
      procedure ScanComplete(Sender: TObject);
      procedure DoSort;
      function GetMap(aIndex: Integer): TKMapInfo;
  
negative.code:   PathToMaps: string;
    MF: TMapFolder;
  begin
    try
      for MF in fMapFolders do
      begin
        PathToMaps := ExeDir + MAP_FOLDER[MF] + PathDelim;
  
        if not DirectoryExists(PathToMaps) then Exit;
  
        FindFirst(PathToMaps + '*', faDirectory, SearchRec);
        repeat
          if (SearchRec.Name <> '.') and (SearchRec.Name <> '..')
          and FileExists(TKMapsCollection.FullPath(SearchRec.Name, '.dat', MF))
          and FileExists(TKMapsCollection.FullPath(SearchRec.Name, '.map', MF)) then
          begin
            ProcessMap(SearchRec.Name, MF);
          end;
        until (FindNext(SearchRec) <> 0) or Terminated;
        FindClose(SearchRec);
      end;
    finally
      if not Terminated and Assigned(fOnComplete) then
        fOnComplete(Self);
    end;
  end;
  
  