Take advantage of pathclass.Extension comparison functionality.
This commit is contained in:
parent
f1ddb0817e
commit
17aabe961d
2 changed files with 2 additions and 2 deletions
|
@ -42,7 +42,7 @@ def fileprefix(
|
||||||
|
|
||||||
filepaths = current_directory.listdir()
|
filepaths = current_directory.listdir()
|
||||||
filepaths = [f for f in filepaths if f.is_file]
|
filepaths = [f for f in filepaths if f.is_file]
|
||||||
filepaths = [f for f in filepaths if f.extension.lower() not in IGNORE_EXTENSIONS]
|
filepaths = [f for f in filepaths if f.extension not in IGNORE_EXTENSIONS]
|
||||||
|
|
||||||
try:
|
try:
|
||||||
pyfile = pathclass.Path(__file__)
|
pyfile = pathclass.Path(__file__)
|
||||||
|
|
|
@ -192,7 +192,7 @@ def search(
|
||||||
if not filepath.is_file:
|
if not filepath.is_file:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
if filepath.extension.lower() == 'lnk' and winshell:
|
if filepath.extension == 'lnk' and winshell:
|
||||||
yield from search_contents_windows_lnk(filepath, content_args)
|
yield from search_contents_windows_lnk(filepath, content_args)
|
||||||
else:
|
else:
|
||||||
yield from search_contents_generic(filepath, content_args)
|
yield from search_contents_generic(filepath, content_args)
|
||||||
|
|
Loading…
Reference in a new issue