Added logic to also look for $USERPROFILE env var on windows systems.

This commit is contained in:
mjbudd77 2021-02-14 06:35:25 -05:00
parent 15b983fc76
commit bf00cb62ca
1 changed files with 6 additions and 0 deletions

View File

@ -17,6 +17,8 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include <QDir>
#include "Qt/main.h"
#include "Qt/throttle.h"
#include "Qt/config.h"
@ -157,6 +159,10 @@ GetBaseDirectory(std::string &dir)
char *home = getenv("HOME");
#ifdef WIN32
if ( home == NULL )
{
home = getenv("USERPROFILE");
}
if ( home == NULL )
{
home = getenv("HOMEPATH");