1
0
mirror of https://github.com/mpv-player/mpv synced 2025-02-24 00:46:58 +00:00

fallback to USERPROFILE environment variable for caching CSS keys when

HOME is not set (for MinGW builds running outside of MinGW).


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@18110 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
reimar 2006-04-15 21:45:29 +00:00
parent 04f628f283
commit fa344d6f7d
2 changed files with 15 additions and 0 deletions

View File

@ -301,6 +301,10 @@ extern dvdcss_t dvdcss_open ( char *psz_target )
{
psz_home = getenv( "HOME" );
}
if( psz_home == NULL )
{
psz_home = getenv( "USERPROFILE" );
}
/* Cache our keys in ${HOME}/.dvdcss/ */
if( psz_home )

View File

@ -70,3 +70,14 @@
#include "common.h"
#include "css.h"
@@ -301,6 +301,10 @@
{
psz_home = getenv( "HOME" );
}
+ if( psz_home == NULL )
+ {
+ psz_home = getenv( "USERPROFILE" );
+ }
/* Cache our keys in ${HOME}/.dvdcss/ */
if( psz_home )