mirror of
https://github.com/ciromattia/kcc
synced 2026-01-10 07:19:41 +00:00
Fixed handling filenames that start with dot (close #310)
This commit is contained in:
@@ -47,7 +47,7 @@ class HTMLStripper(HTMLParser):
|
||||
def getImageFileName(imgfile):
|
||||
name, ext = os.path.splitext(imgfile)
|
||||
ext = ext.lower()
|
||||
if name.startswith('.') or ext not in ['.png', '.jpg', '.jpeg', '.gif', '.webp']:
|
||||
if (name.startswith('.') and len(name) == 1) or ext not in ['.png', '.jpg', '.jpeg', '.gif', '.webp']:
|
||||
return None
|
||||
return [name, ext]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user