Skip to content


Subversion checkout URL

You can clone with
Download ZIP
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...
commit cb345a7e3cde07506bf3a2d696fcbb3dff44477d 1 parent 5ad3814
@Memphiz Memphiz authored
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


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