From d2d0eebd74237b46adb8115b2f89e2b1eb2a3898 Mon Sep 17 00:00:00 2001 From: Ettore Perazzoli Date: Thu, 18 Jul 2002 18:16:18 +0000 Subject: Removed unused variable. * evolution-storage-set-view.c (impl_StorageSetView__set_checkedFolders): Removed unused variable. * e-shell-folder-title-bar.c (e_shell_folder_title_bar_construct): Removed unused variable. * e-storage.c (e_storage_path_is_absolute) (e_storage_path_is_relative) (e_storage_async_xfer_folder) * e-storage-set.c (make_full_path) (get_storage_for_path) (signal_new_folder_for_all_folders_under_paths) (signal_new_folder_for_all_folders_in_storage) (e_storage_set_get_path_for_physical_uri) * e-storage-set-view.c (storage_sort_callback) (new_storage_cb) (removed_storage_cb) (new_folder_cb) * e-shortcuts-view.c (get_shortcut_info): * e-shell-view.c (handle_current_folder_removed) * e-shell-utils.c (e_shell_folder_name_is_valid): * e-local-storage.c (construct): * e-folder-tree.c (get_parent_path) (get_parent_path) (e_folder_tree_destroy) (e_folder_tree_add) (e_folder_tree_foreach) * e-folder-dnd-bridge.c (handle_data_received_path) * evolution-storage.c (make_full_uri): * e-shell-constants.h: New #defines E_PATH_SEPARATOR and E_PATH_SEPARATOR_S. * e-local-storage.c (load_folder): Don't add the folder if its type isn't registered. svn path=/trunk/; revision=17510 --- shell/e-local-storage.c | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) (limited to 'shell/e-local-storage.c') diff --git a/shell/e-local-storage.c b/shell/e-local-storage.c index 393c1aa4da..8c263d1e76 100644 --- a/shell/e-local-storage.c +++ b/shell/e-local-storage.c @@ -184,17 +184,29 @@ setup_stock_folders (ELocalStorage *local_storage) } static gboolean -load_folder (const char *physical_path, const char *path, gpointer data) +load_folder (const char *physical_path, + const char *path, + void *data) { - ELocalStorage *local_storage = data; + ELocalStorage *local_storage; EFolder *folder; + local_storage = E_LOCAL_STORAGE (data); + folder = e_local_folder_new_from_path (physical_path); if (folder == NULL) { g_warning ("No folder metadata in %s... ignoring", physical_path); return TRUE; } + /* Ignore the folder if it uses an unknown type. */ + if (! e_folder_type_register_type_registered (local_storage->priv->folder_type_registry, + e_folder_get_type_string (folder))) { + g_warning ("Folder in %s has unknown type (%s)... ignoring", + physical_path, e_folder_get_type_string (folder)); + return FALSE; + } + new_folder (local_storage, path, folder); return TRUE; } @@ -1095,7 +1107,7 @@ construct (ELocalStorage *local_storage, priv = local_storage->priv; base_path_len = strlen (base_path); - while (base_path_len > 0 && base_path[base_path_len - 1] == G_DIR_SEPARATOR) + while (base_path_len > 0 && base_path[base_path_len - 1] == E_PATH_SEPARATOR) base_path_len--; g_return_val_if_fail (base_path_len != 0, FALSE); -- cgit