Skip to content
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...
1 parent 5ad3814 commit cb345a7e3cde07506bf3a2d696fcbb3dff44477d @Memphiz Memphiz committed
Showing with 4 additions and 0 deletions.
  1. +4 −0 lib/libdvd/libdvdread/src/dvd_reader.c
4 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 */
goto DVDOpen_error;
+#endif // _XBMC
new_path = malloc(PATH_MAX+1);
if(!new_path) {

5 comments on commit cb345a7

Team Kodi member

@Memphiz The title of the commit is maybe a bit misleading, since the return value is still checked. Furthermore I guess a patch is needed for future use.
Best regards!

Team Kodi member

Do we track patches for taht somewhere? (only on phone)

Team Kodi member

tbh i have the feeling those patches aren't complete already. In dvd_reader.c in function DVDOpen - there was already a "if defined(XBMC)" in place which i can't find in the current patchset...

Team Kodi member

@Memphiz @ace20022 - that was me fixing the first issue with those error gotos, cffa184 and 3708d88. I neglected to include a patch file back then. Since I'm out for a whole week, I can't take care of that. I'd suggest that this change plus the one above get combined in a single patch file for dvd_reader.c.

Please sign in to comment.
Something went wrong with that request. Please try again.