Fix DeprecationWarning

This commit is contained in:
linkliti 2026-03-26 17:27:22 +03:00 committed by Alessandro
parent 1b4505d8e5
commit 6257f2cb3b
3 changed files with 5 additions and 5 deletions

View file

@ -268,7 +268,7 @@ class BackupService:
processed_count = 0
try:
spec = PathSpec.from_lines("gitwildmatch", pattern_lines)
spec = PathSpec.from_lines("gitignore", pattern_lines)
# Walk through base directories
for base_pattern_path, base_real_path in self.base_paths.items():
@ -519,7 +519,7 @@ class BackupService:
if pattern_lines:
from pathspec import PathSpec
restore_spec = PathSpec.from_lines("gitwildmatch", pattern_lines)
restore_spec = PathSpec.from_lines("gitignore", pattern_lines)
# Process each file in archive
for archive_path in archive_files:
@ -675,7 +675,7 @@ class BackupService:
if pattern_lines:
from pathspec import PathSpec
restore_spec = PathSpec.from_lines("gitwildmatch", pattern_lines)
restore_spec = PathSpec.from_lines("gitignore", pattern_lines)
# Process each file in archive
for archive_path in archive_files:

View file

@ -507,7 +507,7 @@ def _resolve_ignore_patterns(ignore: str | None, root_abs_path: str) -> Optional
if not lines:
return None
return PathSpec.from_lines("gitwildmatch", lines)
return PathSpec.from_lines("gitignore", lines)
def _list_directory_children(

View file

@ -131,7 +131,7 @@ def _build_ignore_spec(gitignore: str) -> PathSpec | None:
]
if not lines:
return None
return PathSpec.from_lines("gitwildmatch", lines)
return PathSpec.from_lines("gitignore", lines)
def _find_matching_files(