From 53af0a218915186befc731b0d9a16b96f57d266f Mon Sep 17 00:00:00 2001 From: Michiel Nauta Date: Mon, 9 Jan 2012 18:13:34 +0000 Subject: [PATCH] 5397: In "Check & Repair Database" the default path to missing media is always to \gramps\bin svn: r18729 --- src/plugins/tool/Check.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/plugins/tool/Check.py b/src/plugins/tool/Check.py index c8f87d062..cd6d65970 100644 --- a/src/plugins/tool/Check.py +++ b/src/plugins/tool/Check.py @@ -62,6 +62,7 @@ import gtk #------------------------------------------------------------------------- import gen.lib from gen.db import DbTxn +import config import Utils from gui.utils import ProgressMeter import ManagedWindow @@ -219,6 +220,7 @@ class CheckIntegrity(object): self.invalid_dates = [] self.removed_name_format = [] self.empty_objects = defaultdict(list) + self.last_img_dir = config.get('behavior.addmedia-image-dir') self.progress = ProgressMeter(_('Checking Database'),'') def family_errors(self): @@ -624,6 +626,7 @@ class CheckIntegrity(object): obj.set_path(name) self.db.commit_media_object(obj, self.trans) self.replaced_photo.append(ObjectId) + self.last_img_dir = os.path.dirname(name) LOG(' FAIL: media object reselected to "%s"' % name) else: self.bad_photo.append(ObjectId) @@ -633,6 +636,7 @@ class CheckIntegrity(object): buttons=(gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL, gtk.STOCK_OK, gtk.RESPONSE_OK) ) + fs_top.set_current_folder(self.last_img_dir) response = fs_top.run() if response == gtk.RESPONSE_OK: fs_ok_clicked(fs_top)