aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEttore Perazzoli <ettore@src.gnome.org>2001-08-23 03:19:48 +0800
committerEttore Perazzoli <ettore@src.gnome.org>2001-08-23 03:19:48 +0800
commit57516b50dbdd6a4b24a5fab7ab57b8cce7c086fd (patch)
treea089568e34a8e2fb4ac7797ea170c73f799698e0
parentd48d09de1ad0156f25bfac429ff936148c05994d (diff)
downloadgsoc2013-evolution-57516b50dbdd6a4b24a5fab7ab57b8cce7c086fd.tar.gz
gsoc2013-evolution-57516b50dbdd6a4b24a5fab7ab57b8cce7c086fd.tar.zst
gsoc2013-evolution-57516b50dbdd6a4b24a5fab7ab57b8cce7c086fd.zip
Don't remove the folder directory here.
* e-local-storage.c (remove_folder): Don't remove the folder directory here. (component_async_remove_folder_callback): Remove it here instead. svn path=/trunk/; revision=12390
-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;
}