Skip to content

Commit

Permalink
Fix infinite loop when matching ignore patterns
Browse files Browse the repository at this point in the history
  • Loading branch information
shyun3 authored and deadc0de6 committed Oct 24, 2024
1 parent dc0db53 commit d25eae4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion dotdrop/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
import sys
import requests
from packaging import version
from pathlib import PurePath

# local import
from dotdrop.logger import Logger
Expand Down Expand Up @@ -231,7 +232,7 @@ def _match_ignore_pattern(path, pattern, debug=False):
be able to match pattern like "*/dir"
"""
subpath = path
while subpath != os.path.sep:
while subpath != PurePath(path).anchor:
# if debug:
# msg = f'fnmatch \"{subpath}\" against {pattern}'
# LOG.dbg(msg, force=True)
Expand Down

0 comments on commit d25eae4

Please sign in to comment.