Skip to content
Snippets Groups Projects
Commit 50a92094 authored by Romain Bentz's avatar Romain Bentz Committed by Jean-Baptiste Kempf
Browse files

Fix CSS key caching on Android


Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent 3a322908
No related branches found
No related tags found
No related merge requests found
......@@ -215,6 +215,18 @@ static int set_cache_directory( dvdcss_t dvdcss )
dvdcss->psz_cachefile[PATH_MAX - 1] = '\0';
psz_cache = dvdcss->psz_cachefile;
}
#else
#ifdef __ANDROID__
/* $HOME is not writable on __ANDROID__ so we have to create a custom
* directory in userland */
char *psz_home = "/sdcard/Android/data/org.videolan.dvdcss";
int i_ret = mkdir( psz_home, 0755 );
if( i_ret < 0 && errno != EEXIST )
{
print_error( dvdcss, "failed creating home directory" );
psz_home = NULL;
}
#else
char *psz_home = NULL;
#ifdef HAVE_PWD_H
......@@ -228,6 +240,8 @@ static int set_cache_directory( dvdcss_t dvdcss )
}
#endif /* HAVE_PWD_H */
#endif /* __ANDROID__ */
if( psz_home == NULL )
{
psz_home = getenv( "HOME" );
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment