Skip to content


Browse files Browse the repository at this point in the history
Make gdal pam proxy env setting more win friendly
  • Loading branch information
timlinux committed Aug 10, 2011
1 parent 3ab4c13 commit e12191b
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/core/qgsapplication.cpp
Expand Up @@ -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;
Expand Down Expand Up @@ -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());
//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 );

Expand Down

0 comments on commit e12191b

Please sign in to comment.