Skip to content

Commit d7573b3

Browse files
authored
fix: process ignore patterns for wcmatch in unlinked registry (#1124)
1 parent c6f6697 commit d7573b3

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/tagstudio/core/library/alchemy/registries/unlinked_registry.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
from tagstudio.core.library.alchemy.library import Library
99
from tagstudio.core.library.alchemy.models import Entry
10-
from tagstudio.core.library.ignore import PATH_GLOB_FLAGS, Ignore
10+
from tagstudio.core.library.ignore import PATH_GLOB_FLAGS, Ignore, ignore_to_glob
1111
from tagstudio.core.utils.types import unwrap
1212

1313
logger = structlog.get_logger()
@@ -47,7 +47,8 @@ def match_unlinked_file_entry(self, match_entry: Entry) -> list[Path]:
4747
library_dir = unwrap(self.lib.library_dir)
4848
matches: list[Path] = []
4949

50-
ignore_patterns = Ignore.get_patterns(library_dir)
50+
# NOTE: ignore_to_glob() is needed for wcmatch, not ripgrep.
51+
ignore_patterns = ignore_to_glob(Ignore.get_patterns(library_dir))
5152
for path in pathlib.Path(str(library_dir)).glob(
5253
f"***/{match_entry.path.name}",
5354
flags=PATH_GLOB_FLAGS,

0 commit comments

Comments
 (0)