From 081bb9b3ba15a80f06705b3666721543f6cd711f Mon Sep 17 00:00:00 2001 From: John Schember Date: Fri, 1 Jan 2010 20:30:42 -0500 Subject: [PATCH] USBMS: Use filename_callback on the filename with template and tags. --- src/calibre/devices/usbms/device.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/calibre/devices/usbms/device.py b/src/calibre/devices/usbms/device.py index c56e0c0025..9018879f83 100644 --- a/src/calibre/devices/usbms/device.py +++ b/src/calibre/devices/usbms/device.py @@ -870,7 +870,7 @@ class Device(DeviceConfig, DevicePlugin): if special_tag is None: from calibre.library.save_to_disk import get_components extra_components = get_components(template, mdata, fname) - extra_components[-1] += ext + extra_components[-1] = extra_components[-1] = sanitize(self.filename_callback(extra_components[-1]+ext, mdata))) else: tag = special_tag if tag.startswith(_('News')): @@ -884,7 +884,7 @@ class Device(DeviceConfig, DevicePlugin): c = sanitize(c) if not c: continue extra_components.append(c) - extra_componets.append(fname) + extra_componets.append(sanitize(self.filename_callback(fname, mdata))) if not use_subdirs: extra_components = extra_components[:1]