Take advantage of pathclass.Extension comparison functionality.

This commit is contained in:
voussoir 2020-01-29 16:39:08 -08:00
parent f1ddb0817e
commit 17aabe961d
2 changed files with 2 additions and 2 deletions

View file

@ -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__)

View 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)