changeset 9882:454d8a4bd4f9

forwardport: warning fix and netbsd fix
author alex
date Tue, 08 Apr 2003 17:36:33 +0000
parents 60d1ccf22469
children 3a407acefec5
files libmpdvdkit2/libdvdcss.c
diffstat 1 files changed, 8 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/libmpdvdkit2/libdvdcss.c	Tue Apr 08 17:11:19 2003 +0000
+++ b/libmpdvdkit2/libdvdcss.c	Tue Apr 08 17:36:33 2003 +0000
@@ -117,6 +117,12 @@
 #define SYS_CYGWIN
 #endif
 
+#ifndef HAVE_MPLAYER
+ #include "get_path.c"
+#else
+ extern char * get_path( char * filename );
+#endif
+
 /**
  * \brief Symbol for version checks.
  *
@@ -390,7 +396,7 @@
             goto nocache;
         }
 
-        i += sprintf( dvdcss->psz_cachefile + i, "/%s/", psz_data );
+        i += sprintf( dvdcss->psz_cachefile + i, "/%s", psz_data );
 #if !defined( WIN32 ) || defined( SYS_CYGWIN )
         i_ret = mkdir( dvdcss->psz_cachefile, 0755 );
 #else
@@ -402,6 +408,7 @@
             dvdcss->psz_cachefile[0] = '\0';
             goto nocache;
         }
+        i += sprintf( dvdcss->psz_cachefile + i, "/");
 
         /* Pointer to the filename we will use. */
         dvdcss->psz_block = dvdcss->psz_cachefile + i;