aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--shell/ChangeLog6
-rw-r--r--shell/e-local-storage.c75
2 files changed, 44 insertions, 37 deletions
diff --git a/shell/ChangeLog b/shell/ChangeLog
index 6e036b1192..7dd7fbe112 100644
--- a/shell/ChangeLog
+++ b/shell/ChangeLog
@@ -1,5 +1,11 @@
2001-08-22 Ettore Perazzoli <ettore@ximian.com>
+ * e-local-storage.c (remove_folder): Don't remove the folder
+ directory here.
+ (component_async_remove_folder_callback): Remove it here instead.
+
+2001-08-22 Ettore Perazzoli <ettore@ximian.com>
+
[Fix #7775, crash trying to do New Task]
* e-shell-user-creatable-items-handler.c (verb_fn): Make sure we
diff --git a/shell/e-local-storage.c b/shell/e-local-storage.c
index 7322c40cd5..4685aa5c7d 100644
--- a/shell/e-local-storage.c
+++ b/shell/e-local-storage.c
@@ -411,40 +411,6 @@ struct _AsyncRemoveFolderCallbackData {
};
typedef struct _AsyncRemoveFolderCallbackData AsyncRemoveFolderCallbackData;
-static void
-component_async_remove_folder_callback (EvolutionShellComponentClient *shell_component_client,
- EvolutionShellComponentResult result,
- void *data)
-{
- AsyncRemoveFolderCallbackData *callback_data;
- EStorageResult storage_result;
-
- callback_data = (AsyncRemoveFolderCallbackData *) data;
-
- storage_result = shell_component_result_to_storage_result (result);
-
- /* If result == HASSUBFOLDERS then recurse delete the subfolders dir? */
-
- /* FIXME: Handle errors */
- if (result == EVOLUTION_SHELL_COMPONENT_OK) {
- ELocalStoragePrivate *priv;
-
- priv = E_LOCAL_STORAGE (callback_data->storage)->priv;
-
- e_storage_removed_folder (E_STORAGE (callback_data->storage),
- callback_data->path);
-
- evolution_storage_removed_folder (EVOLUTION_STORAGE (priv->bonobo_interface),
- callback_data->path);
- }
-
- bonobo_object_unref (BONOBO_OBJECT (shell_component_client));
-
- g_free (callback_data->path);
- g_free (callback_data->physical_path);
- g_free (callback_data);
-}
-
static EStorageResult
remove_folder_directory (ELocalStorage *local_storage,
const char *path)
@@ -490,6 +456,43 @@ remove_folder_directory (ELocalStorage *local_storage,
return E_STORAGE_OK;
}
+static void
+component_async_remove_folder_callback (EvolutionShellComponentClient *shell_component_client,
+ EvolutionShellComponentResult result,
+ void *data)
+{
+ AsyncRemoveFolderCallbackData *callback_data;
+ EStorageResult storage_result;
+
+ callback_data = (AsyncRemoveFolderCallbackData *) data;
+
+ result = remove_folder_directory (E_LOCAL_STORAGE (callback_data->storage),
+ callback_data->path);
+
+ storage_result = shell_component_result_to_storage_result (result);
+
+ /* If result == HASSUBFOLDERS then recurse delete the subfolders dir? */
+
+ /* FIXME: Handle errors */
+ if (result == EVOLUTION_SHELL_COMPONENT_OK) {
+ ELocalStoragePrivate *priv;
+
+ priv = E_LOCAL_STORAGE (callback_data->storage)->priv;
+
+ e_storage_removed_folder (E_STORAGE (callback_data->storage),
+ callback_data->path);
+
+ evolution_storage_removed_folder (EVOLUTION_STORAGE (priv->bonobo_interface),
+ callback_data->path);
+ }
+
+ bonobo_object_unref (BONOBO_OBJECT (shell_component_client));
+
+ g_free (callback_data->path);
+ g_free (callback_data->physical_path);
+ g_free (callback_data);
+}
+
static EStorageResult
remove_folder (ELocalStorage *local_storage,
const char *path,
@@ -542,9 +545,7 @@ remove_folder (ELocalStorage *local_storage,
component_async_remove_folder_callback,
callback_data);
- result = remove_folder_directory (E_LOCAL_STORAGE (local_storage), path);
-
- return result;
+ return EVOLUTION_SHELL_COMPONENT_OK;
}