summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Neumair <chris@gnome-de.org>2005-09-19 15:50:57 +0000
committerChristian Neumair <cneumair@src.gnome.org>2005-09-19 15:50:57 +0000
commitf9ee9215e4ebe0cef6fe152858be98601ac5438d (patch)
tree2182157febc849345e825ced4b338de8fb67999c
parent5a539de655e84c3e4d7d1dceeacaaf3812fd9893 (diff)
downloadnautilus-f9ee9215e4ebe0cef6fe152858be98601ac5438d.tar.gz
Try to use the trash associated with a symlink's parent directory if
2005-09-19 Christian Neumair <chris@gnome-de.org> * libnautilus-private/nautilus-file-operations.c: (nautilus_file_operations_copy_move),: Try to use the trash associated with a symlink's parent directory if resolution fails because of broken symlink when moving symlink to trash. * libnautilus-private/nautilus-file-operations.c: (nautilus_self_check_file_operations): Fix date self checks. Fixes #47364.
-rw-r--r--ChangeLog12
-rw-r--r--libnautilus-private/nautilus-file-operations.c15
2 files changed, 25 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index a4726cf5b..20771452e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2005-09-19 Christian Neumair <chris@gnome-de.org>
+
+ * libnautilus-private/nautilus-file-operations.c:
+ (nautilus_file_operations_copy_move),:
+ Try to use the trash associated with a symlink's parent directory if
+ resolution fails because of broken symlink when moving symlink to
+ trash.
+
+ * libnautilus-private/nautilus-file-operations.c:
+ (nautilus_self_check_file_operations):
+ Fix date self checks. Fixes #47364.
+
2005-09-19 Alexander Larsson <alexl@redhat.com>
* icons/Makefile.am:
diff --git a/libnautilus-private/nautilus-file-operations.c b/libnautilus-private/nautilus-file-operations.c
index 372ff909b..c2e58a8cf 100644
--- a/libnautilus-private/nautilus-file-operations.c
+++ b/libnautilus-private/nautilus-file-operations.c
@@ -1859,8 +1859,15 @@ nautilus_file_operations_copy_move (const GList *item_uris,
target_uri = NULL;
if (target_dir != NULL) {
if (target_is_trash) {
- gnome_vfs_find_directory (source_uri, GNOME_VFS_DIRECTORY_KIND_TRASH,
- &target_dir_uri, FALSE, FALSE, 0777);
+ result = gnome_vfs_find_directory (source_uri, GNOME_VFS_DIRECTORY_KIND_TRASH,
+ &target_dir_uri, FALSE, FALSE, 0777);
+ if (result == GNOME_VFS_ERROR_NOT_FOUND && source_dir_uri != NULL) {
+ /* source_uri may be a broken symlink */
+ result = gnome_vfs_find_directory (source_dir_uri, GNOME_VFS_DIRECTORY_KIND_TRASH,
+ &target_dir_uri, FALSE, FALSE, 0777);
+ }
+
+ result = GNOME_VFS_OK;
}
if (target_dir_uri != NULL) {
target_uri = append_basename (target_dir_uri, source_uri);
@@ -2712,6 +2719,8 @@ nautilus_file_operations_empty_trash (GtkWidget *parent_view)
void
nautilus_self_check_file_operations (void)
{
+ setlocale (LC_MESSAGES, "C");
+
/* test the next duplicate name generator */
EEL_CHECK_STRING_RESULT (get_duplicate_name (" (copy)", 1), " (another copy)");
EEL_CHECK_STRING_RESULT (get_duplicate_name ("foo", 1), "foo (copy)");
@@ -2754,6 +2763,8 @@ nautilus_self_check_file_operations (void)
EEL_CHECK_STRING_RESULT (get_duplicate_name ("foo (122nd copy).txt", 1), "foo (123rd copy).txt");
EEL_CHECK_STRING_RESULT (get_duplicate_name ("foo (123rd copy)", 1), "foo (124th copy)");
EEL_CHECK_STRING_RESULT (get_duplicate_name ("foo (123rd copy).txt", 1), "foo (124th copy).txt");
+
+ setlocale (LC_MESSAGES, "");
}
#endif