Skip to content
Permalink
Browse files

Merge pull request #6502 from elpaso/bugfix-18230-server-prefix-path

[bugfix][server] Fix prefix path for server
  • Loading branch information
elpaso committed Mar 1, 2018
2 parents 4f4b831 + 0050eb5 commit baeaeace10f04d289551f8dc64af1647225df757
Showing with 6 additions and 1 deletion.
  1. +6 −1 src/core/qgsapplication.cpp
@@ -220,7 +220,12 @@ void QgsApplication::init( QString profileFolder )
setPrefixPath( myPrefix, true );
#else
QDir myDir( applicationDirPath() );
myDir.cdUp();
// Fix for server which is one level deeper in /usr/lib/cgi-bin
if ( applicationDirPath().contains( QStringLiteral( "cgi-bin" ) ) )
{
myDir.cdUp();
}
myDir.cdUp(); // Go from /usr/bin or /usr/lib (for server) to /usr
QString myPrefix = myDir.absolutePath();
setPrefixPath( myPrefix, true );
#endif

0 comments on commit baeaeac

Please sign in to comment.
You can’t perform that action at this time.