diff --git a/src/device.c b/src/device.c index 2d7621b..a7f8880 100644 --- a/src/device.c +++ b/src/device.c @@ -5926,7 +5926,7 @@ struct Job /* ---------------------- udf -------------------- */ -static const char *udf_defaults[] = { "uid=", "gid=", "iocharset=utf8", "umask=0077", "dmode=0500", NULL }; +static const char *udf_defaults[] = { "uid=", "gid=", "iocharset=utf8", "umask=0077", NULL }; static const char *udf_allow[] = { "iocharset=", "umask=", "mode=", "dmode=", NULL }; static const char *udf_allow_uid_self[] = { "uid=", NULL }; static const char *udf_allow_gid_self[] = { "gid=", NULL }; @@ -6203,6 +6203,15 @@ struct Job /* dynamic default options */ + /* some broken DVDs come with 0400 directory permissions, making them + * unreadable; overwrite readonly UDF media with a 0500 dmode. */ + if (g_strcmp0 (device->priv->id_type, "udf") == 0 && device->priv->device_is_optical_disc && + device->priv->drive_media != NULL && + strstr(device->priv->drive_media, "_rw") == NULL && strstr(device->priv->drive_media, "_ram") == NULL) + { + g_ptr_array_add (options, g_strdup("dmode=0500")); + } + /* user supplied options */ for (n = 0; given_options[n] != NULL; n++) {