After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 792581 - restore: don't attempt to open target read-only
restore: don't attempt to open target read-only
Status: RESOLVED FIXED
Product: gnome-disk-utility
Classification: Core
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: gnome-disk-utility-maint
gnome-disk-utility-maint
Depends on:
Blocks:
 
 
Reported: 2018-01-16 16:57 UTC by Will Thompson
Modified: 2018-01-18 16:13 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
restore: don't attempt to open target read-only (3.88 KB, patch)
2018-01-16 16:57 UTC, Will Thompson
committed Details | Review

Description Will Thompson 2018-01-16 16:57:25 UTC
This code seems to be duplicated from gducreatediskimagedialog.c, but in
this context we need 'fd' to be writable. We could still attempt to
open() the device directly (with O_WRONLY) but as the comment says, by
definition /dev/sr* is read-only by nature (or at least, cannot be
written to in this way), so it is unlikely to be of any use.

In any case, in practice this code path will never be taken since the
"Restore" action is not available for optical media.
Comment 1 Will Thompson 2018-01-16 16:57:29 UTC
Created attachment 366890 [details] [review]
restore: don't attempt to open target read-only
Comment 2 Kai Lüke 2018-01-18 01:22:37 UTC
Hi,

thanks for the patch, I will have a look soon.

Regards,
Kai
Comment 3 Kai Lüke 2018-01-18 16:11:38 UTC
Review of attachment 366890 [details] [review]:

Thanks for fixing it.