Commit 66421873 authored by Ilkka Ollakka's avatar Ilkka Ollakka

file-access (+vdr,mtp): give error message also in Fatal dialog

parent d895ab4f
...@@ -172,7 +172,7 @@ int Open( vlc_object_t *p_this ) ...@@ -172,7 +172,7 @@ int Open( vlc_object_t *p_this )
{ {
msg_Err (p_access, "cannot open file %s (%m)", path); msg_Err (p_access, "cannot open file %s (%m)", path);
dialog_Fatal (p_access, _("File reading failed"), dialog_Fatal (p_access, _("File reading failed"),
_("VLC could not open the file \"%s\"."), path); _("VLC could not open the file \"%s\". (%m)"), path);
} }
#ifdef WIN32 #ifdef WIN32
...@@ -303,7 +303,7 @@ ssize_t FileRead( access_t *p_access, uint8_t *p_buffer, size_t i_len ) ...@@ -303,7 +303,7 @@ ssize_t FileRead( access_t *p_access, uint8_t *p_buffer, size_t i_len )
default: default:
msg_Err (p_access, "failed to read (%m)"); msg_Err (p_access, "failed to read (%m)");
dialog_Fatal (p_access, _("File reading failed"), "%s", dialog_Fatal (p_access, _("File reading failed"), "%s (%m)",
_("VLC could not read the file.")); _("VLC could not read the file."));
p_access->info.b_eof = true; p_access->info.b_eof = true;
return 0; return 0;
......
...@@ -218,7 +218,7 @@ static ssize_t Read( access_t *p_access, uint8_t *p_buffer, size_t i_len ) ...@@ -218,7 +218,7 @@ static ssize_t Read( access_t *p_access, uint8_t *p_buffer, size_t i_len )
default: default:
msg_Err( p_access, "read failed (%m)" ); msg_Err( p_access, "read failed (%m)" );
dialog_Fatal( p_access, _( "File reading failed" ), "%s", dialog_Fatal( p_access, _( "File reading failed" ), "%s (%m)",
_( "VLC could not read the file." ) ); _( "VLC could not read the file." ) );
p_access->info.b_eof = true; p_access->info.b_eof = true;
return 0; return 0;
...@@ -307,7 +307,7 @@ static int open_file( access_t *p_access, const char *path ) ...@@ -307,7 +307,7 @@ static int open_file( access_t *p_access, const char *path )
{ {
msg_Err( p_access, "cannot open file %s (%m)", path ); msg_Err( p_access, "cannot open file %s (%m)", path );
dialog_Fatal( p_access, _( "File reading failed" ), dialog_Fatal( p_access, _( "File reading failed" ),
_( "VLC could not open the file \"%s\"." ), path ); _( "VLC could not open the file \"%s\". (%m)" ), path );
return -1; return -1;
} }
......
...@@ -387,7 +387,7 @@ static ssize_t Read( access_t *p_access, uint8_t *p_buffer, size_t i_len ) ...@@ -387,7 +387,7 @@ static ssize_t Read( access_t *p_access, uint8_t *p_buffer, size_t i_len )
{ {
/* abort on read error */ /* abort on read error */
msg_Err( p_access, "failed to read (%m)" ); msg_Err( p_access, "failed to read (%m)" );
dialog_Fatal( p_access, _("File reading failed"), "%s", dialog_Fatal( p_access, _("File reading failed"), "%s (%m)",
_("VLC could not read the file.") ); _("VLC could not read the file.") );
SwitchFile( p_access, -1 ); SwitchFile( p_access, -1 );
return 0; return 0;
...@@ -558,7 +558,7 @@ static bool SwitchFile( access_t *p_access, unsigned i_file ) ...@@ -558,7 +558,7 @@ static bool SwitchFile( access_t *p_access, unsigned i_file )
error: error:
dialog_Fatal (p_access, _("File reading failed"), _("VLC could not" dialog_Fatal (p_access, _("File reading failed"), _("VLC could not"
" open the file \"%s\"."), psz_path); " open the file \"%s\". (%m)"), psz_path);
if( p_sys->fd != -1 ) if( p_sys->fd != -1 )
{ {
close( p_sys->fd ); close( p_sys->fd );
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment