[vlc-commits] dvdread: Inform user when disc access is not granted

David Fuhrmann git at videolan.org
Mon Feb 10 18:32:53 CET 2020


vlc/vlc-3.0 | branch: master | David Fuhrmann <dfuhrmann at videolan.org> | Thu Feb  6 22:31:49 2020 +0100| [d15965980b0ca269421d3d5cf2688a7e1b2fe93f] | committer: David Fuhrmann

dvdread: Inform user when disc access is not granted

macOS only asks once when requesting ressource access. If the user
declines for some reason, VLC will error out silently in subsequent
tries. Lets inform the user and explain better what he needs to
change in order to gain access again.

(cherry picked from commit 103f456658ab45cda7908b81c0b91815fe2cc031)
Signed-off-by: David Fuhrmann <dfuhrmann at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=d15965980b0ca269421d3d5cf2688a7e1b2fe93f
---

 modules/access/dvdread.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/modules/access/dvdread.c b/modules/access/dvdread.c
index f9271dc6f8..9d372b5a36 100644
--- a/modules/access/dvdread.c
+++ b/modules/access/dvdread.c
@@ -199,8 +199,16 @@ static int Open( vlc_object_t *p_this )
     if( p_dvdread == NULL )
     {
         msg_Err( p_demux, "DVDRead cannot open source: %s", psz_file );
+#ifdef __APPLE__
+        vlc_dialog_display_error( p_demux, _("Problem accessing a system resource"),
+            _("Potentially, macOS blocks access to your disc. "
+              "Please open \"System Preferences\" -> \"Security & Privacy\" "
+              "and allow VLC to access your external media in \"Files and Folders\" section."));
+#else
         vlc_dialog_display_error( p_demux, _("Playback failure"),
                       _("DVDRead could not open the disc \"%s\"."), psz_file );
+#endif
+
         free( psz_file );
         return VLC_EGENERIC;
     }



More information about the vlc-commits mailing list