From 2f2b246d712caa8cbc7c47a46b05db22eb4e8aa1 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Tue, 21 Apr 2020 20:14:17 +0530 Subject: [PATCH] Book details panel: Fix copy path to file not copying full path to file when right clicking on a format entry --- src/calibre/gui2/book_details.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/calibre/gui2/book_details.py b/src/calibre/gui2/book_details.py index 5b77323a8f..5f3503dcc7 100644 --- a/src/calibre/gui2/book_details.py +++ b/src/calibre/gui2/book_details.py @@ -3,7 +3,7 @@ # License: GPLv3 Copyright: 2010, Kovid Goyal 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'))