From 72d21d6a0c5ef96b408c482de7a68bff94c92418 Mon Sep 17 00:00:00 2001 From: David Hampton Date: Sun, 16 Dec 2001 03:39:25 +0000 Subject: [PATCH] Create images directory if necessary. svn: r625 --- src/plugins/WebPage.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/plugins/WebPage.py b/src/plugins/WebPage.py index 161f5bea0..603cd8915 100644 --- a/src/plugins/WebPage.py +++ b/src/plugins/WebPage.py @@ -867,6 +867,19 @@ def on_ok_clicked(obj): dir_name) return + image_dir_name = os.path.join(dir_name, "images") + if not os.path.isdir(image_dir_name) and not no_photos: + try: + os.mkdir(image_dir_name) + except IOError, value: + GnomeErrorDialog(_("Could not create the directory : %s") % \ + image_dir_name + "\n" + value[1]) + return + except: + GnomeErrorDialog(_("Could not create the directory : %s") % \ + image_dir_name) + return + filter = filter_map[filterName] ind_list = []