diff options
author | Paweł Jastrzębski <pawelj@iosphe.re> | 2019-08-04 09:25:32 +0200 |
---|---|---|
committer | Paweł Jastrzębski <pawelj@iosphe.re> | 2019-08-04 09:25:32 +0200 |
commit | 4c13ef0f6c17af57793cf5a6c9e2c852719329c9 (patch) | |
tree | ec66088c14e619e7cd2b8d4216e174fef1a6ab5e /kindlecomicconverter | |
parent | Added profile label for Oasis 3 (diff) | |
download | kcc-4c13ef0f6c17af57793cf5a6c9e2c852719329c9.tar.gz kcc-4c13ef0f6c17af57793cf5a6c9e2c852719329c9.tar.bz2 kcc-4c13ef0f6c17af57793cf5a6c9e2c852719329c9.zip |
Fixed handling filenames that start with dot (close #310)
Diffstat (limited to 'kindlecomicconverter')
-rw-r--r-- | kindlecomicconverter/shared.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kindlecomicconverter/shared.py b/kindlecomicconverter/shared.py index d2a358f..507873b 100644 --- a/kindlecomicconverter/shared.py +++ b/kindlecomicconverter/shared.py @@ -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] |