aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/ephy-file-helpers.c14
-rw-r--r--lib/ephy-file-helpers.h2
2 files changed, 12 insertions, 4 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
diff --git a/lib/ephy-file-helpers.h b/lib/ephy-file-helpers.h
index d399b4a5a..bfb7e1b6c 100644
--- a/lib/ephy-file-helpers.h
+++ b/lib/ephy-file-helpers.h
@@ -40,7 +40,7 @@ const char *ephy_file_tmp_dir (void);
char *ephy_file_tmp_filename (const char *base,
const char *extension);
-void ephy_ensure_dir_exists (const char *dir);
+gboolean ephy_ensure_dir_exists (const char *dir);
GSList *ephy_file_find (const char *path,
const char *fname,