Christopher Richards
2003-03-21 23:46:08 UTC
NetBSD's mkdir(2) doesn't like trailing "/" on its argument. Hence
this patch, which should work regardless of platform:
--- src/libdvdcss.c.orig Sat Feb 1 16:24:49 2003
+++ src/libdvdcss.c
@@ -398,7 +398,7 @@ extern dvdcss_t dvdcss_open ( char *psz_
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
@@ -410,6 +410,7 @@ extern dvdcss_t dvdcss_open ( char *psz_
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;
this patch, which should work regardless of platform:
--- src/libdvdcss.c.orig Sat Feb 1 16:24:49 2003
+++ src/libdvdcss.c
@@ -398,7 +398,7 @@ extern dvdcss_t dvdcss_open ( char *psz_
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
@@ -410,6 +410,7 @@ extern dvdcss_t dvdcss_open ( char *psz_
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;
--
This is the libdvdcss-devel mailing-list, see http://developers.videolan.org/
To unsubscribe, please read http://developers.videolan.org/lists.html
If you are in trouble, please contact <***@videolan.org>
This is the libdvdcss-devel mailing-list, see http://developers.videolan.org/
To unsubscribe, please read http://developers.videolan.org/lists.html
If you are in trouble, please contact <***@videolan.org>