refactor: extract should_include_path to utils module to resolve circular import between indexer and attachment_indexer
This commit is contained in:
@@ -4,7 +4,7 @@ from pathlib import Path
|
||||
from typing import Dict, List, Optional, Set
|
||||
import threading
|
||||
|
||||
from backend.indexer import _should_include_path
|
||||
from backend.utils import should_include_path
|
||||
|
||||
logger = logging.getLogger("obsigate.attachment_indexer")
|
||||
|
||||
@@ -67,7 +67,7 @@ def _scan_vault_attachments(vault_name: str, vault_path: str, vault_cfg: dict =
|
||||
for fpath in vault_root.rglob("*"):
|
||||
# Check if path should be included based on hidden files configuration
|
||||
rel_parts = fpath.relative_to(vault_root).parts
|
||||
if not _should_include_path(rel_parts, vault_cfg):
|
||||
if not should_include_path(rel_parts, vault_cfg):
|
||||
continue
|
||||
|
||||
# Only process files
|
||||
|
||||
Reference in New Issue
Block a user