From 7b293d3caacb00dbedc5b92b7959a6f2d39282fe Mon Sep 17 00:00:00 2001 From: GRiker Date: Wed, 23 Jan 2013 13:34:16 -0700 Subject: [PATCH] Provisional patch for relocated cache dir. Not fully tested. --- src/calibre/devices/apple/driver.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/calibre/devices/apple/driver.py b/src/calibre/devices/apple/driver.py index 55056238e6..d3fbaed121 100644 --- a/src/calibre/devices/apple/driver.py +++ b/src/calibre/devices/apple/driver.py @@ -9,7 +9,7 @@ import cStringIO, ctypes, datetime, os, platform, re, shutil, sys, tempfile, tim from calibre.constants import __appname__, __version__, DEBUG as CALIBRE_DEBUG from calibre import fit_image, confirm_config_name, strftime as _strftime -from calibre.constants import isosx, iswindows +from calibre.constants import isosx, iswindows, cache_dir as _cache_dir from calibre.devices.errors import OpenFeedback, UserFeedback from calibre.devices.usbms.deviceconfig import DeviceConfig from calibre.devices.interface import DevicePlugin @@ -291,6 +291,8 @@ class ITUNES(DriverBase): # Properties cached_books = {} + cache_dir = os.path.join(_cache_dir(), 'itunes') + archive_path = os.path.join(cache_dir, "thumbs.zip") calibre_library_path = prefs['library_path'] description_prefix = "added by calibre" ejected = False @@ -885,8 +887,6 @@ class ITUNES(DriverBase): logger().info(" BCD: %s" % ['0x%x' % x for x in sorted(self.BCD)]) logger().info(" PRODUCT_ID: %s" % ['0x%x' % x for x in sorted(self.PRODUCT_ID)]) - self.cache_dir = os.path.join(cache_dir(), 'itunes') - self.archive_path = os.path.join(self.cache_dir, "thumbs.zip") # Confirm/create thumbs archive if not os.path.exists(self.cache_dir): if DEBUG: