Skip to content

Commit

Permalink
Book details panel: Fix copy path to file not copying full path to fi…
Browse files Browse the repository at this point in the history
…le when right clicking on a format entry
  • Loading branch information
kovidgoyal committed Apr 21, 2020
1 parent 5e69f54 commit 2f2b246
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/calibre/gui2/book_details.py
Expand Up @@ -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

Expand Down Expand Up @@ -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'))
Expand Down

0 comments on commit 2f2b246

Please sign in to comment.