diff options
author | Marco Pesenti Gritti <marco@gnome.org> | 2004-07-22 17:17:09 +0800 |
---|---|---|
committer | Marco Pesenti Gritti <marco@src.gnome.org> | 2004-07-22 17:17:09 +0800 |
commit | 8ed863129291204c3b293e41dae4bc3a1c7e9127 (patch) | |
tree | d68732b960661ad2a5a818320c02d946b8eeeae1 /lib/ephy-file-helpers.c | |
parent | 561c5a9432b239aee5581ef83b0f38c5eeecd30c (diff) | |
download | gsoc2013-epiphany-8ed863129291204c3b293e41dae4bc3a1c7e9127.tar gsoc2013-epiphany-8ed863129291204c3b293e41dae4bc3a1c7e9127.tar.gz gsoc2013-epiphany-8ed863129291204c3b293e41dae4bc3a1c7e9127.tar.bz2 gsoc2013-epiphany-8ed863129291204c3b293e41dae4bc3a1c7e9127.tar.lz gsoc2013-epiphany-8ed863129291204c3b293e41dae4bc3a1c7e9127.tar.xz gsoc2013-epiphany-8ed863129291204c3b293e41dae4bc3a1c7e9127.tar.zst gsoc2013-epiphany-8ed863129291204c3b293e41dae4bc3a1c7e9127.zip |
Handle the case where the downloads dir cannot be created gracefully. Fix
2004-07-22 Marco Pesenti Gritti <marco@gnome.org>
* doc/reference/tmpl/ephy-embed.sgml:
* embed/mozilla/MozDownload.cpp:
* lib/ephy-file-helpers.c: (ephy_ensure_dir_exists):
* lib/ephy-file-helpers.h:
Handle the case where the downloads dir cannot be
created gracefully. Fix #146902
Diffstat (limited to 'lib/ephy-file-helpers.c')
-rw-r--r-- | lib/ephy-file-helpers.c | 14 |
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 |