This commit is contained in:
Rhet Turnbull
2022-01-06 22:13:17 -08:00
parent 0c9bd87602
commit 661a573bf5
3 changed files with 10 additions and 4 deletions

View File

@@ -591,6 +591,9 @@ def get_preferred_uti_extension(uti):
def get_uti_for_extension(extension):
"""get UTI for a given file extension"""
if not extension:
return None
# accepts extension with or without leading 0
if extension[0] == ".":
extension = extension[1:]