[Nautilus-list] Fix for crash on canceling delete
- From: Martin Wehner <mwehner tfh-berlin de>
- To: Nautilus List <nautilus-list lists eazel com>
- Subject: [Nautilus-list] Fix for crash on canceling delete
- Date: 08 Dec 2001 20:40:46 +0100
Hi,
Nautilus crashed when a delete operation is canceled (Bug#48347).
This happens because handle_transfer_ok() doesn't check if the canceled
operation was a delete and so tries to delete partial files which
resulted from this operation. This leads to a call to
nautilus_file_operations_delete() with a null pointer as parameter and
eventually to a segfault in gnome_vfs_get_file_info_uri_cancellable()
(no parameter checking there).
Martin
Index: libnautilus-private/nautilus-file-operations.c
===================================================================
RCS file:
/cvs/gnome/nautilus/libnautilus-private/nautilus-file-operations.c,v
retrieving revision 1.138
diff -u -r1.138 nautilus-file-operations.c
--- libnautilus-private/nautilus-file-operations.c 2001/11/09
02:05:37 1.138
+++ libnautilus-private/nautilus-file-operations.c 2001/12/08 19:30:15
@@ -452,8 +452,10 @@
TransferInfo *transfer_info)
{
if (transfer_info->cancelled
- && progress_info->phase != GNOME_VFS_XFER_PHASE_COMPLETED) {
- /* If cancelled, delete any partially copied files that are laying
+ && progress_info->phase != GNOME_VFS_XFER_PHASE_COMPLETED
+ && transfer_info->kind != TRANSFER_DELETE) {
+ /* If cancelled and the operation wasn't a delete,
+ * delete any partially copied files that are laying
* around and return.
*/
if (progress_info->bytes_total != progress_info->bytes_copied) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]