Skip to content

Error using filter attr directory in files catalog #388

@ueffel

Description

@ueffel

Keypirinha Version: 2.23

Multiple users reported problems with the + attr: directory filters setting for files catalog profiles.

Profiles like this:

[profile/Projects]
activate = yes
paths = 
    ${var:KNOWNFOLDER_DESKTOP}\**
filters =
    + attr: directory
max_depth = -1
include_dirs = yes
file_item_label = {profile}: {dir1}\{clean_name}

Produce the following error:

** ERROR: Error from FilesCatalog.FilesCatalog.on_events: <class 'TypeError'>: '_GlobExEntry_Path' object does not support indexing
Traceback (most recent call last):
  File "C:\Apps\Keypirinha\default\Packages\FilesCatalog.keypirinha-package\filescatalog.py", line 356, in on_events
  File "C:\Apps\Keypirinha\default\Packages\FilesCatalog.keypirinha-package\filescatalog.py", line 311, in on_catalog
  File "C:\Apps\Keypirinha\default\Packages\FilesCatalog.keypirinha-package\filescatalog.py", line 203, in default_scan_callback
  File "C:\Apps\Keypirinha\python\site\filefilter.py", line 423, in match
    elif path_or_entry[0] == '.':

References to the chatroom:

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions