Skip to content
Permalink
Browse files
Make gdal pam proxy env setting more win friendly
  • Loading branch information
timlinux committed Aug 10, 2011
1 parent 3ab4c13 commit e12191bd6c2ad2e30dad3b515f1abb1e70f139f1
Showing with 9 additions and 0 deletions.
  1. +9 −0 src/core/qgsapplication.cpp
@@ -34,6 +34,7 @@
#include "qgsconfig.h"

#include <ogr_api.h>
#include <cpl_conv.h> // for setting gdal options

QObject * QgsApplication::mFileOpenEventReceiver;
QStringList QgsApplication::mFileOpenEventList;
@@ -126,8 +127,16 @@ void QgsApplication::init( QString customConfigPath )
{
myDir.mkpath( myPamPath ); //fail silently
}


#if defined(Q_WS_WIN32) || defined(WIN32)
CPLSetConfigOption("GDAL_PAM_PROXY_DIR", myPamPath.toUtf8());
#else
//under other OS's we use an environment var so the user can
//override the path if he likes
int myChangeFlag = 0; //whether we want to force the env var to change
setenv( "GDAL_PAM_PROXY_DIR", myPamPath.toUtf8(), myChangeFlag );
#endif
}

QgsApplication::~QgsApplication()

0 comments on commit e12191b

Please sign in to comment.