about summary refs log tree commit diff
diff options
context:
space:
mode:
authorPaweł Jastrzębski <pawelj@iosphe.re>2019-08-04 09:25:32 +0200
committerPaweł Jastrzębski <pawelj@iosphe.re>2019-08-04 09:25:32 +0200
commit4c13ef0f6c17af57793cf5a6c9e2c852719329c9 (patch)
treeec66088c14e619e7cd2b8d4216e174fef1a6ab5e
parentAdded profile label for Oasis 3 (diff)
downloadkcc-4c13ef0f6c17af57793cf5a6c9e2c852719329c9.tar.gz
kcc-4c13ef0f6c17af57793cf5a6c9e2c852719329c9.tar.bz2
kcc-4c13ef0f6c17af57793cf5a6c9e2c852719329c9.zip
Fixed handling filenames that start with dot (close #310)
-rw-r--r--kindlecomicconverter/shared.py2
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]