From 2ceeb7143bcf0c4e976c346696821d0368f50a93 Mon Sep 17 00:00:00 2001 From: Tim G L Lyons Date: Fri, 1 Feb 2013 17:40:24 +0000 Subject: [PATCH] export file select dialogue does not correctly reject empty filenames - two (probably long standing) coding errors: use of method name 'strip' instead of calling it, and does not isolate the filename from the full pathname svn: r21268 --- gramps/gui/plug/export/_exportassistant.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gramps/gui/plug/export/_exportassistant.py b/gramps/gui/plug/export/_exportassistant.py index 103d070e2..764b1d143 100644 --- a/gramps/gui/plug/export/_exportassistant.py +++ b/gramps/gui/plug/export/_exportassistant.py @@ -317,7 +317,8 @@ class ExportAssistant(Gtk.Assistant, ManagedWindow) : 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 filename.strip and find_folder(filename) == '' \ + 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)