[mythtv] [mythtv-commits] Ticket #4593: /.mythtv/ should *not*get created (blank homedir)

Nigel Pearson nigel at ind.tansu.com.au
Tue Feb 5 23:56:32 UTC 2008


> On Windows HOME is usually not set

Well, a MinGW shell sets it, but an XP DOS 'cmd' doesn't.
It seems to set all of USERPROFILE, HOMEDRIVE, and HOMEPATH.


Qt seems to use all three:


QString QDir::homeDirPath()
...
{
     QString d = p_getenv ( "HOME" );
     if ( d.isNull () ) {
         d = p_getenv ( "USERPROFILE" );
         if ( d.isNull () ) {
             QString homeDrive = p_getenv ( "HOMEDRIVE" );
             QString homePath = p_getenv ( "HOMEPATH" );
             if ( !homeDrive.isNull () && !homePath.isNull () ) {
                 d = homeDrive + homePath;
             } else {
                 d = rootDirPath ();



so I don't think we will need a patch, or a check, on XP?

--
Nigel Pearson, nigel at ind.tansu.com.au|"Reality is that which,
Telstra Net. Eng., Sydney, Australia | when you stop believing
Office: 9202 3900    Fax:  9261 3912 | in it, doesn't go away."
Mobile: 0408 664435  Home: 9792 6998 | Philip K. Dick - 'Valis'


More information about the mythtv-dev mailing list