File tree Expand file tree Collapse file tree 1 file changed +2
-5
lines changed
src/tagstudio/core/library Expand file tree Collapse file tree 1 file changed +2
-5
lines changed Original file line number Diff line number Diff line change 3838
3939
4040def ignore_to_glob (ignore_patterns : list [str ]) -> list [str ]:
41- """Convert .gitignore-like patterns to explicit glob syntax.
41+ """Convert .gitignore-like patterns to Unix-like glob syntax.
4242
4343 Args:
4444 ignore_patterns (list[str]): The .gitignore-like patterns to convert.
@@ -48,7 +48,7 @@ def ignore_to_glob(ignore_patterns: list[str]) -> list[str]:
4848 additional_patterns : list [str ] = []
4949 root_patterns : list [str ] = []
5050
51- # Mimic implicit .gitignore syntax behavior for the SQLite GLOB function .
51+ # Expand .gitignore patterns to mimic the same behavior with unix-like glob patterns .
5252 for pattern in glob_patterns :
5353 # Temporarily remove any exclusion character before processing
5454 exclusion_char = ""
@@ -62,9 +62,6 @@ def ignore_to_glob(ignore_patterns: list[str]) -> list[str]:
6262 gp = "**/" + gp
6363 additional_patterns .append (exclusion_char + gp )
6464
65- gp = gp .removesuffix ("/**" ).removesuffix ("/*" ).removesuffix ("/" )
66- additional_patterns .append (exclusion_char + gp )
67-
6865 gp = gp .removeprefix ("**/" ).removeprefix ("*/" )
6966 additional_patterns .append (exclusion_char + gp )
7067
You can’t perform that action at this time.
0 commit comments