aboutsummaryrefslogtreecommitdiffstats
path: root/shell/e-local-storage.c
diff options
context:
space:
mode:
Diffstat (limited to 'shell/e-local-storage.c')
-rw-r--r--shell/e-local-storage.c11
1 files changed, 5 insertions, 6 deletions
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);
}