aboutsummaryrefslogtreecommitdiff
path: root/src/setup.c
diff options
context:
space:
mode:
authorhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2009-12-17 02:51:57 +0000
committerhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2009-12-17 02:51:57 +0000
commitd5175b3fc5fda02558b7754ba160eee360ccb7ec (patch)
treeae491e12e7e2c1b3e88127db4e438d598698e36e /src/setup.c
parent5fb2905b9f6c975ef03240393363471c81c1e21d (diff)
src/setup.c: check whether the specified location includes settings folder.
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@2398 ee746299-78ed-0310-b773-934348b2243d
Diffstat (limited to 'src/setup.c')
-rw-r--r--src/setup.c18
1 files changed, 13 insertions, 5 deletions
diff --git a/src/setup.c b/src/setup.c
index 756ec13e..5824c38d 100644
--- a/src/setup.c
+++ b/src/setup.c
@@ -240,11 +240,19 @@ void setup(MainWindow *mainwin)
} else
path = g_strdup("Mail");
- if (path && folder_find_from_path(path)) {
- alertpanel_error(_("The mailbox '%s' already exists."), path);
- g_warning("The mailbox '%s' already exists.", path);
- g_free(path);
- path = NULL;
+ if (path) {
+ if (folder_find_from_path(path)) {
+ alertpanel_error(_("The mailbox '%s' already exists."), path);
+ g_warning("The mailbox '%s' already exists.", path);
+ g_free(path);
+ path = NULL;
+ } else if (is_path_parent(path, get_rc_dir()) ||
+ is_path_parent(path, get_mail_base_dir())) {
+ alertpanel_error(_("The location '%s' includes settings folder. Please specify another location."), path);
+ g_warning("The location '%s' includes settings folder.", path);
+ g_free(path);
+ path = NULL;
+ }
}
} while (path == NULL);