From 1460b7a0461066d04d8a1982ce9e113a6039e3c8 Mon Sep 17 00:00:00 2001 From: Jim Miller Date: Sun, 17 Apr 2016 23:29:36 -0500 Subject: [PATCH] Fix for file.xhtml/file.xhtml in Editor File Browser when duplicate file names. --- src/calibre/gui2/tweak_book/file_list.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/calibre/gui2/tweak_book/file_list.py b/src/calibre/gui2/tweak_book/file_list.py index 6f0caa489f..90af38b6b2 100644 --- a/src/calibre/gui2/tweak_book/file_list.py +++ b/src/calibre/gui2/tweak_book/file_list.py @@ -312,7 +312,7 @@ class FileList(QTreeWidget): return parts = name.split('/') - text = parts[-1] + text = parts.pop() while text in seen and parts: text = parts.pop() + '/' + text seen[text] = item