[nautilus] file: don't try to save undo information for failed actions
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus] file: don't try to save undo information for failed actions
- Date: Mon, 17 Sep 2012 14:19:21 +0000 (UTC)
commit c61efd3ffeb801c87b84ffde9ba503a9797818e3
Author: Cosimo Cecchi <cosimoc gnome org>
Date: Mon Sep 17 10:16:49 2012 -0400
file: don't try to save undo information for failed actions
This fixes a crasher when creating a folder with the same name of an
existing one.
https://bugzilla.gnome.org/show_bug.cgi?id=684147
libnautilus-private/nautilus-file.c | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
---
diff --git a/libnautilus-private/nautilus-file.c b/libnautilus-private/nautilus-file.c
index 046a1c1..dec3bf1 100644
--- a/libnautilus-private/nautilus-file.c
+++ b/libnautilus-private/nautilus-file.c
@@ -1674,7 +1674,9 @@ nautilus_file_operation_free (NautilusFileOperation *op)
}
void
-nautilus_file_operation_complete (NautilusFileOperation *op, GFile *result_file, GError *error)
+nautilus_file_operation_complete (NautilusFileOperation *op,
+ GFile *result_file,
+ GError *error)
{
/* Claim that something changed even if the operation failed.
* This makes it easier for some clients who see the "reverting"
@@ -1685,6 +1687,11 @@ nautilus_file_operation_complete (NautilusFileOperation *op, GFile *result_file,
if (op->callback) {
(* op->callback) (op->file, result_file, error, op->callback_data);
}
+
+ if (error != NULL) {
+ g_clear_object (&op->undo_info);
+ }
+
nautilus_file_operation_free (op);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]