Skip to content
This repository
Browse code

[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...
commit cb345a7e3cde07506bf3a2d696fcbb3dff44477d 1 parent 5ad3814
Memphiz authored April 20, 2013

Showing 1 changed file with 4 additions and 0 deletions. Show diff stats Hide diff stats

  1. 4  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 )
432 432
433 433
       if( ( cdir  = open( ".", O_RDONLY ) ) >= 0 ) {
434 434
         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 */
435 438
           goto DVDOpen_error;
+#endif // _XBMC
436 440
437 441
 		new_path = malloc(PATH_MAX+1);
438 442
 		if(!new_path) {

5 notes on commit cb345a7

Andreas Zelend

@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!


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


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...


@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.