From f792d959e2dba155581ba651b4a356534c1f8459 Mon Sep 17 00:00:00 2001 From: hsoft Date: Tue, 29 Sep 2009 14:07:50 +0000 Subject: [PATCH] [#8] Changed the appdata base path (and PE's) --HG-- extra : convert_revision : svn%3Ac306627e-7827-47d3-bdf0-9a457c9553a1/trunk%40158 --- base/py/app_cocoa.py | 4 +++- pe/py/app_cocoa.py | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/base/py/app_cocoa.py b/base/py/app_cocoa.py index 5e1cb8e6..de9522db 100644 --- a/base/py/app_cocoa.py +++ b/base/py/app_cocoa.py @@ -7,6 +7,7 @@ # which should be included with this package. The terms are also available at # http://www.hardcoded.net/licenses/hs_license +from Foundation import * from AppKit import * import logging import os.path as op @@ -44,7 +45,8 @@ class DupeGuru(app.DupeGuru): install_exception_hook() if data_module is None: data_module = data - appdata = op.expanduser(op.join('~', '.hsoftdata', appdata_subdir)) + appsupport = NSSearchPathForDirectoriesInDomains(NSApplicationSupportDirectory, NSUserDomainMask, True)[0] + appdata = op.join(appsupport, appdata_subdir) app.DupeGuru.__init__(self, data_module, appdata, appid) self.progress = cocoa.ThreadedJobPerformer() self.display_delta_values = False diff --git a/pe/py/app_cocoa.py b/pe/py/app_cocoa.py index 52849c97..4880b2e2 100644 --- a/pe/py/app_cocoa.py +++ b/pe/py/app_cocoa.py @@ -125,7 +125,7 @@ class IPhotoLibrary(fs.Directory): class DupeGuruPE(app_cocoa.DupeGuru): def __init__(self): - app_cocoa.DupeGuru.__init__(self, data, 'dupeguru_pe', appid=5) + app_cocoa.DupeGuru.__init__(self, data, 'dupeGuru Picture Edition', appid=5) self.scanner.match_factory = matchbase.AsyncMatchFactory() self.directories.dirclass = Directory self.directories.special_dirclasses[Path('iPhoto Library')] = lambda _, __: self._create_iphoto_library()