From 58755d5604d35422d133c39aab785078a40fb8b4 Mon Sep 17 00:00:00 2001 From: Ettore Perazzoli Date: Tue, 25 Sep 2001 23:01:33 +0000 Subject: [Implemented the "Rename" command. Warning, it doesn't quite work yet, as there seems to be something wrong still.] * e-storage.c (e_storage_async_xfer_folder): Ooops. Make the check for CANTMOVETODESCENDANT really work. * e-storage-set-view.c (tree_drag_data_received): Pass the EStorageSetView as the data for the async_xfer function. (folder_xfer_callback): Display an error dialog if something goes wrong. * e-shell-view-menu.c (command_rename_folder): Enable again. * e-shell-folder-commands.c (e_shell_command_rename_folder): Re-implemented. (delete_dialog): Use double quotes instead of single quotes around the folder name, for consistency with the other dialogs. svn path=/trunk/; revision=13131 --- shell/e-storage.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'shell/e-storage.c') diff --git a/shell/e-storage.c b/shell/e-storage.c index 17c8d94f14..f482a0f6ce 100644 --- a/shell/e-storage.c +++ b/shell/e-storage.c @@ -468,10 +468,15 @@ e_storage_async_xfer_folder (EStorage *storage, g_return_if_fail (g_path_is_absolute (destination_path)); if (remove_source) { + int destination_len; int source_len; source_len = strlen (source_path); - if (strncmp (destination_path, source_path, source_len) == 0) { + destination_len = strlen (destination_path); + + if (source_len < destination_len + && destination_path[source_len] == G_DIR_SEPARATOR + && strncmp (destination_path, source_path, source_len) == 0) { (* callback) (storage, E_STORAGE_CANTMOVETODESCENDANT, data); return; } -- cgit v1.2.3