From 6f6c61f87fae560a28aa07d543c232c951f99f0d Mon Sep 17 00:00:00 2001 From: lukefromdc Date: Sun, 31 Dec 2017 01:10:29 -0500 Subject: eject: Do not show "safe to remove" notification if drive fails to unmount --- libcaja-private/caja-file-operations.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libcaja-private/caja-file-operations.c b/libcaja-private/caja-file-operations.c index ad525d2d..30602bc1 100644 --- a/libcaja-private/caja-file-operations.c +++ b/libcaja-private/caja-file-operations.c @@ -2134,7 +2134,10 @@ unmount_mount_callback (GObject *source_object, if (data->eject) { unmounted = g_mount_eject_with_operation_finish (G_MOUNT (source_object), res, &error); - caja_application_notify_unmount_show ("It is now safe to remove the drive"); + if ((!error) || (unmounted == TRUE)){ + caja_application_notify_unmount_show ("It is now safe to remove the drive"); + } + } else { unmounted = g_mount_unmount_with_operation_finish (G_MOUNT (source_object), res, &error); -- cgit v1.2.1