Permalink
Browse files

[dvdread] - don't check the return value of chdir in xbmc - this func…

…tion is not wrapped and might fail (and so will the whole dvd open in that case). This is non fatal for our vfs!
  • Loading branch information...
Memphiz committed Apr 19, 2013
1 parent 5ad3814 commit cb345a7e3cde07506bf3a2d696fcbb3dff44477d
Showing with 4 additions and 0 deletions.
  1. +4 −0 lib/libdvd/libdvdread/src/dvd_reader.c
@@ -432,7 +432,11 @@ dvd_reader_t *DVDOpen( const char *ppath )
{
if( ( cdir = open( ".", O_RDONLY ) ) >= 0 ) {
if( chdir( path_copy ) == -1 ) {
+#if defined(_XBMC)
+ fprintf( stderr, "libdvdread: failed to change working directory to \"%s\": %s\n", path_copy, strerror(errno)); /* but ignore error */
+#else
goto DVDOpen_error;
+#endif // _XBMC
}
new_path = malloc(PATH_MAX+1);
if(!new_path) {

0 comments on commit cb345a7

Please sign in to comment.