aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorVoyager1 <voyager@xbmc.org>2013-05-10 16:52:21 +0200
committerVoyager1 <voyager@xbmc.org>2013-05-10 20:36:20 +0200
commit56b4e565a6a9cf740f4e06d6813e23ab8d524d93 (patch)
treebbf537fbf5362cdf68040c6289084294da264cfc /lib
parent21eb522cfd8f261d41a0330ddf61c1a3ef3d4003 (diff)
[libdvd] update patch for libdvdread
Diffstat (limited to 'lib')
-rw-r--r--lib/libdvd/patches/01-libdvdread.diff (renamed from lib/libdvd/patches/libdvdread.diff)0
-rw-r--r--lib/libdvd/patches/02-libdvdread_fix_symlinks_resolution_vfs.diff34
2 files changed, 34 insertions, 0 deletions
diff --git a/lib/libdvd/patches/libdvdread.diff b/lib/libdvd/patches/01-libdvdread.diff
index fbf185f0dd..fbf185f0dd 100644
--- a/lib/libdvd/patches/libdvdread.diff
+++ b/lib/libdvd/patches/01-libdvdread.diff
diff --git a/lib/libdvd/patches/02-libdvdread_fix_symlinks_resolution_vfs.diff b/lib/libdvd/patches/02-libdvdread_fix_symlinks_resolution_vfs.diff
new file mode 100644
index 0000000000..30c66c3f4c
--- /dev/null
+++ b/lib/libdvd/patches/02-libdvdread_fix_symlinks_resolution_vfs.diff
@@ -0,0 +1,34 @@
+diff --git a/lib/libdvd/libdvdread/src/dvd_reader.c b/lib/libdvd/libdvdread/src/dvd_reader.c
+index d9544b3..f5ee550 100644
+--- a/lib/libdvd/libdvdread/src/dvd_reader.c
++++ b/lib/libdvd/libdvdread/src/dvd_reader.c
+@@ -429,10 +429,17 @@ dvd_reader_t *DVDOpen( const char *ppath )
+ /* Also WIN32 does not have symlinks, so we don't need this bit of code. */
+
+ /* Resolve any symlinks and get the absolute dir name. */
++#if defined(_XBMC) /* for XBMC, only do symlink resolution for (real) non-xbmc-VFS paths */
++ if ( path[0] == '/' )
++#endif // _XBMC
+ {
+ 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) {
+@@ -445,7 +452,11 @@ dvd_reader_t *DVDOpen( const char *ppath )
+ close( cdir );
+ cdir = -1;
+ if( retval == -1 ) {
++#if defined(_XBMC)
++ fprintf( stderr, "libdvdread: failed to reset working directory to \".\": %s\n", strerror(errno)); /* but ignore error */
++#else
+ goto DVDOpen_error;
++#endif // _XBMC
+ }
+ path_copy = new_path;
+ new_path = NULL;