aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEttore Perazzoli <ettore@src.gnome.org>2003-04-22 04:00:56 +0800
committerEttore Perazzoli <ettore@src.gnome.org>2003-04-22 04:00:56 +0800
commit7f0a93f2ed9295a6720d96285be768adfc7403a6 (patch)
treea9197b58eb25bf054d340f265e170bf0fed4f5f8
parentad576399ac6f38b4b53c59f2db88e231b3a1e9c8 (diff)
downloadgsoc2013-evolution-7f0a93f2ed9295a6720d96285be768adfc7403a6.tar
gsoc2013-evolution-7f0a93f2ed9295a6720d96285be768adfc7403a6.tar.gz
gsoc2013-evolution-7f0a93f2ed9295a6720d96285be768adfc7403a6.tar.bz2
gsoc2013-evolution-7f0a93f2ed9295a6720d96285be768adfc7403a6.tar.lz
gsoc2013-evolution-7f0a93f2ed9295a6720d96285be768adfc7403a6.tar.xz
gsoc2013-evolution-7f0a93f2ed9295a6720d96285be768adfc7403a6.tar.zst
gsoc2013-evolution-7f0a93f2ed9295a6720d96285be768adfc7403a6.zip
(create_folder_directory): Don't signal an
error if mkdir() returns EEXIST. This should at least help with situations like the one described in #40989. svn path=/trunk/; revision=20911
-rw-r--r--shell/ChangeLog6
-rw-r--r--shell/e-local-storage.c11
2 files changed, 11 insertions, 6 deletions
diff --git a/shell/ChangeLog b/shell/ChangeLog
index 844ab595dd..a9be31cf26 100644
--- a/shell/ChangeLog
+++ b/shell/ChangeLog
@@ -1,3 +1,9 @@
+2003-04-21 Ettore Perazzoli <ettore@ximian.com>
+
+ * e-local-storage.c (create_folder_directory): Don't signal an
+ error if mkdir() returns EEXIST. This should at least help with
+ situations like the one described in #40989.
+
2003-04-21 Anna Marie Dirks <anna@ximian.com>
* e-shell-folder-commands.c (delete_dialog): Corrected border
diff --git a/shell/e-local-storage.c b/shell/e-local-storage.c
index 6aa41e23f8..cc72484175 100644
--- a/shell/e-local-storage.c
+++ b/shell/e-local-storage.c
@@ -393,13 +393,12 @@ create_folder_directory (ELocalStorage *local_storage,
parent = g_strdup_printf ("%s/", parent_path);
subfolders_directory_physical_path = e_path_to_physical (priv->base_path, parent);
- if (! g_file_test (subfolders_directory_physical_path, G_FILE_TEST_EXISTS)) {
- if (mkdir (subfolders_directory_physical_path, 0700) == -1) {
- g_free (subfolders_directory_physical_path);
- g_free (parent);
- return errno_to_storage_result ();
- }
+ if (mkdir (subfolders_directory_physical_path, 0700) == -1 && errno != EEXIST) {
+ g_free (subfolders_directory_physical_path);
+ g_free (parent);
+ return errno_to_storage_result ();
}
+
g_free (subfolders_directory_physical_path);
g_free (parent);
}