mirror of
git://github.com/kovidgoyal/calibre.git
synced 2025-12-25 00:25:42 +01:00
Book details panel: Fix copy path to file not copying full path to file when right clicking on a format entry
This commit is contained in:
parent
5e69f54113
commit
2f2b246d71
1 changed files with 3 additions and 1 deletions
|
|
@ -3,7 +3,7 @@
|
|||
# License: GPLv3 Copyright: 2010, Kovid Goyal <kovid at kovidgoyal.net>
|
||||
from __future__ import absolute_import, division, print_function, unicode_literals
|
||||
|
||||
import re
|
||||
import re, os
|
||||
from collections import namedtuple
|
||||
from functools import partial
|
||||
|
||||
|
|
@ -220,6 +220,8 @@ def connect_action(ac, entry):
|
|||
menu.addAction(_('Edit %s...') % fmt.upper(), partial(book_info.edit_fmt, book_id, fmt))
|
||||
path = data['path']
|
||||
if path:
|
||||
if data.get('fname'):
|
||||
path = os.path.join(path, data['fname'] + '.' + data['fmt'].lower())
|
||||
ac = book_info.copy_link_action
|
||||
ac.current_url = path
|
||||
ac.setText(_('&Copy path to file'))
|
||||
|
|
|
|||
Loading…
Reference in a new issue