From f84970875ea6ac80f47e8fea1eeada7550f7a706 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(-) (limited to 'libcaja-private') diff --git a/libcaja-private/caja-file-operations.c b/libcaja-private/caja-file-operations.c index cb3ba2ba..d8320339 100644 --- a/libcaja-private/caja-file-operations.c +++ b/libcaja-private/caja-file-operations.c @@ -2135,7 +2135,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