[gvfs] udisks2: Send unmount notification only once when stopping
- From: Ondrej Holy <oholy src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gvfs] udisks2: Send unmount notification only once when stopping
- Date: Mon, 29 Feb 2016 12:04:45 +0000 (UTC)
commit ba397fa918250cee436e1cfd5fd5049b4ee42068
Author: Ondrej Holy <oholy redhat com>
Date: Fri Feb 19 12:14:30 2016 +0100
udisks2: Send unmount notification only once when stopping
Unmount notification is sent for each volume when stopping drive,
which is wrong. It may lead to data loss, because user may unplug
the device after the first notification, before the device is really
stopped. It should be handled similary as an eject operation and
send the notification only once for the drive.
https://bugzilla.gnome.org/show_bug.cgi?id=760523
monitor/udisks2/gvfsudisks2mount.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/monitor/udisks2/gvfsudisks2mount.c b/monitor/udisks2/gvfsudisks2mount.c
index af91a38..29f2a3d 100644
--- a/monitor/udisks2/gvfsudisks2mount.c
+++ b/monitor/udisks2/gvfsudisks2mount.c
@@ -601,7 +601,8 @@ unmount_data_complete (UnmountData *data,
gboolean complete_idle)
{
if (data->mount_operation &&
- !unmount_operation_is_eject (data->mount_operation))
+ !unmount_operation_is_eject (data->mount_operation) &&
+ !unmount_operation_is_stop (data->mount_operation))
gvfs_udisks2_unmount_notify_stop (data->mount_operation, data->failed);
if (complete_idle)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]