aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ephy-file-helpers.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/ephy-file-helpers.c')
-rw-r--r--lib/ephy-file-helpers.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/lib/ephy-file-helpers.c b/lib/ephy-file-helpers.c
index 5b8dbc323..138d8719f 100644
--- a/lib/ephy-file-helpers.c
+++ b/lib/ephy-file-helpers.c
@@ -224,17 +224,25 @@ ephy_file_helpers_shutdown (void)
dot_dir = NULL;
}
-void
+gboolean
ephy_ensure_dir_exists (const char *dir)
{
if (g_file_test (dir, G_FILE_TEST_IS_DIR) == FALSE)
{
if (g_file_test (dir, G_FILE_TEST_EXISTS) == TRUE)
- g_error (_("%s exists, please move it out of the way."), dir);
+ {
+ g_warning (_("%s exists, please move it out of the way."), dir);
+ return FALSE;
+ }
if (mkdir (dir, 488) != 0)
- g_error (_("Failed to create directory %s."), dir);
+ {
+ g_warning (_("Failed to create directory %s."), dir);
+ return FALSE;
+ }
}
+
+ return TRUE;
}
static void