From ca931a2712a3f935bad4bec658d2e2294f37e086 Mon Sep 17 00:00:00 2001 From: jun7 Date: Sun, 20 May 2018 01:30:38 +0900 Subject: [PATCH] Move the block making parent dir to correct pos --- ephy-uri-tester.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/ephy-uri-tester.c b/ephy-uri-tester.c index 4db54f0..f5ced5b 100644 --- a/ephy-uri-tester.c +++ b/ephy-uri-tester.c @@ -1029,11 +1029,6 @@ static void init() gchar *path = g_build_filename( g_get_user_config_dir(), APPNAME, "easylist.txt", NULL); - char *dir = g_path_get_dirname(path); - if (!g_file_test(dir, G_FILE_TEST_EXISTS)) - g_mkdir_with_parents(dir, 0700); - g_free(dir); - GFile *gf = g_file_new_for_path(path); GFileMonitor *gm = g_file_monitor_file(gf, G_FILE_MONITOR_NONE, NULL, NULL); @@ -1046,6 +1041,11 @@ static void init() tester = ephy_uri_tester_new("/foo/bar"); initt = g_thread_new("init", inittcb, NULL); + } else { + char *dir = g_path_get_dirname(path); + if (!g_file_test(dir, G_FILE_TEST_EXISTS)) + g_mkdir_with_parents(dir, 0700); + g_free(dir); } g_free(path);