Knowledgebase

status_loader
Die folgenden Inhalte sind nicht auf Deutsch verfügbar.

Not handling zip files as folders

Frage / Problem

If I use the TJamShellList with a certain file filter, .zip files are being displayed as well, although the .zip extension is not a part of the filter. Is that a bug?

Antwort / Lösung

No actually it's not, since zip archives can be enumerated as well - the filter will be applied to the contents of the zip file.

If you want to change this, you can either:

  • Set the "FileSystemOnly" property of the ShellList to true
  • Implement the "OnAddItem" event and exclude zip files:

procedure TMainForm.ShellListAddItem(Item: TJamShellListItem;
  var CanAdd: Boolean);
begin
  if (Item.IsFolder and Item.AbsoluteItemIdList.HasAttributes(SFGAO_STREAM)) then
    CanAdd := false;
end;

Brauchen Sie weitere Hilfe?

Keine passende Antwort gefunden? Kontaktieren Sie uns, damit wir Ihre Frage beantworten können.

Kontaktformular