From b4c225fc356252276de21925384d985d94f40108 Mon Sep 17 00:00:00 2001 From: Benny Malengier Date: Thu, 28 Mar 2013 09:09:29 +0000 Subject: [PATCH] 6496: GUI Export fails in gramps40 svn: r21774 --- gramps/gui/plug/export/_exportassistant.py | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/gramps/gui/plug/export/_exportassistant.py b/gramps/gui/plug/export/_exportassistant.py index 764b1d143..c867eef6d 100644 --- a/gramps/gui/plug/export/_exportassistant.py +++ b/gramps/gui/plug/export/_exportassistant.py @@ -315,15 +315,20 @@ class ExportAssistant(Gtk.Assistant, ManagedWindow) : show=True """ filename = filechooser.get_filename() - folder = filechooser.get_current_folder() - #the file must be valid, not a folder, and folder must be valid - if filename and os.path.basename(filename.strip()) \ - and find_folder(filename) == '' \ - and folder and find_folder(folder): - #this page of the assistant is complete - self.set_page_complete(filechooser, True) - else : + if not filename: self.set_page_complete(filechooser, False) + else: + folder = filechooser.get_current_folder() + if not folder: + folder = find_folder(filename) + else: + folder = find_folder(folder) + #the file must be valid, not a folder, and folder must be valid + if (filename and os.path.basename(filename.strip()) and folder): + #this page of the assistant is complete + self.set_page_complete(filechooser, True) + else : + self.set_page_complete(filechooser, False) def create_page_confirm(self): # Construct confirm page