changeset 18109:68145aae7349

fallback to USERPROFILE environment variable for caching CSS keys when HOME is not set (for MinGW builds running outside of MinGW).
author reimar
date Sat, 15 Apr 2006 21:45:29 +0000
parents ddd84e99f17c
children 0dd0bcc57c18
files libmpdvdkit2/libdvdcss.c libmpdvdkit2/libdvdcss_changes.diff
diffstat 2 files changed, 15 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/libmpdvdkit2/libdvdcss.c	Sat Apr 15 21:27:16 2006 +0000
+++ b/libmpdvdkit2/libdvdcss.c	Sat Apr 15 21:45:29 2006 +0000
@@ -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 )
--- a/libmpdvdkit2/libdvdcss_changes.diff	Sat Apr 15 21:27:16 2006 +0000
+++ b/libmpdvdkit2/libdvdcss_changes.diff	Sat Apr 15 21:45:29 2006 +0000
@@ -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 )