From 54c880fb2b2e0f9d3454a4dbbaeae904708b271f Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Thu, 23 Apr 2015 08:24:15 +0530 Subject: [PATCH] ... --- src/calibre/libunzip.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/calibre/libunzip.py b/src/calibre/libunzip.py index bad66f35bb..8599b372cb 100644 --- a/src/calibre/libunzip.py +++ b/src/calibre/libunzip.py @@ -46,6 +46,8 @@ def extract(filename, dir): def sort_key(filename): bn, ext = filename.rpartition('.')[::2] + if not bn and ext: + bn, ext = ext, bn return (numeric_sort_key(bn), numeric_sort_key(ext)) def extract_member(filename, match=re.compile(r'\.(jpg|jpeg|gif|png)\s*$', re.I), sort_alphabetically=False):