mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
cdiff : handle original_* files
This commit is contained in:
parent
d203e9cd3a
commit
9f747c4aca
@ -442,6 +442,10 @@ def main(args=sys.argv):
|
|||||||
from calibre.gui2 import Application
|
from calibre.gui2 import Application
|
||||||
left, right = sys.argv[-2:]
|
left, right = sys.argv[-2:]
|
||||||
ext1, ext2 = left.rpartition('.')[-1].lower(), right.rpartition('.')[-1].lower()
|
ext1, ext2 = left.rpartition('.')[-1].lower(), right.rpartition('.')[-1].lower()
|
||||||
|
if ext1.startswith('original_'):
|
||||||
|
ext1 = ext1.partition('_')[-1]
|
||||||
|
if ext2.startswith('original_'):
|
||||||
|
ext2 = ext2.partition('_')[-2]
|
||||||
if os.path.isdir(left):
|
if os.path.isdir(left):
|
||||||
attr = 'dir_diff'
|
attr = 'dir_diff'
|
||||||
elif (ext1, ext2) in {('epub', 'epub'), ('azw3', 'azw3')}:
|
elif (ext1, ext2) in {('epub', 'epub'), ('azw3', 'azw3')}:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user