mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-07 10:14:46 -04: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
@ -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 add_format_entries(menu, data, book_info):
|
||||
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…
x
Reference in New Issue
Block a user