Fix handling of root drive path as within_directory.
This commit is contained in:
parent
dd581a8274
commit
40d369e2bb
1 changed files with 2 additions and 1 deletions
|
@ -838,7 +838,8 @@ class PDBPhotoMixin:
|
|||
notnulls.add('extension')
|
||||
|
||||
if within_directory:
|
||||
patterns = {f'{d.absolute_path}{os.sep}%' for d in within_directory}
|
||||
patterns = {d.absolute_path.rstrip(os.sep) for d in within_directory}
|
||||
patterns = {f'{d}{os.sep}%' for d in patterns}
|
||||
clauses = ['filepath LIKE ?'] * len(patterns)
|
||||
if len(clauses) > 1:
|
||||
clauses = ' OR '.join(clauses)
|
||||
|
|
Loading…
Reference in a new issue