Skip to content

Commit

Permalink
Change depth behavior (until instead of at)
Browse files Browse the repository at this point in the history
  • Loading branch information
jordan committed Oct 15, 2024
1 parent 5f5bfe4 commit 445e7b3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions smbclientng/core/SMBSession.py
Original file line number Diff line number Diff line change
Expand Up @@ -269,9 +269,9 @@ def should_exclude(dir_name, depth):
bool: True if the directory should be excluded, False otherwise.
"""
for rule in exclusion_rules:
if rule['depth'] != -1 and rule['depth'] != depth:
continue # Depth does not match

# Check if the depth is within the exclusion range
if rule['depth'] != -1 and depth > rule['depth']:
continue # Current depth is beyond the specified depth, do not exclude
# Perform matching based on case sensitivity
if rule['case_sensitive']:
if dir_name == rule['dirname']:
Expand Down

0 comments on commit 445e7b3

Please sign in to comment.