[gnome-disk-utility] Don't unmount CD/DVD discs before creating a disk image of them
- From: David Zeuthen <davidz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-disk-utility] Don't unmount CD/DVD discs before creating a disk image of them
- Date: Mon, 3 Jun 2013 16:19:30 +0000 (UTC)
commit 232a47ff76c44fcdffdade5a5c32f794f0daaf71
Author: David Zeuthen <zeuthen gmail com>
Date: Mon Jun 3 09:18:27 2013 -0700
Don't unmount CD/DVD discs before creating a disk image of them
It's not needed and, actually, slightly annoying.
Signed-off-by: David Zeuthen <zeuthen gmail com>
src/disks/gducreatediskimagedialog.c | 24 ++++++++++++++++++------
1 files changed, 18 insertions(+), 6 deletions(-)
---
diff --git a/src/disks/gducreatediskimagedialog.c b/src/disks/gducreatediskimagedialog.c
index dc9933e..e5c36cd 100644
--- a/src/disks/gducreatediskimagedialog.c
+++ b/src/disks/gducreatediskimagedialog.c
@@ -1049,12 +1049,24 @@ on_dialog_response (GtkDialog *dialog,
case GTK_RESPONSE_OK:
if (check_overwrite (data))
{
- /* ensure the device is unused (e.g. unmounted) before copying data from it... */
- gdu_window_ensure_unused (data->window,
- data->object,
- (GAsyncReadyCallback) ensure_unused_cb,
- NULL, /* GCancellable */
- data);
+ /* If it's a optical drive, we don't need to try and
+ * manually unmount etc. everything as we're attempting to
+ * open it O_RDONLY anyway - see copy_thread_func() for
+ * details.
+ */
+ if (g_str_has_prefix (udisks_block_get_device (data->block), "/dev/sr"))
+ {
+ start_copying (data);
+ }
+ else
+ {
+ /* ensure the device is unused (e.g. unmounted) before copying data from it... */
+ gdu_window_ensure_unused (data->window,
+ data->object,
+ (GAsyncReadyCallback) ensure_unused_cb,
+ NULL, /* GCancellable */
+ data);
+ }
}
break;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]