Skip to content


[bugfix][server] Fix prefix path for server
Browse files Browse the repository at this point in the history
Fixes #18230 - service configuration error (service unknown or unsupported)

I though about placing the fix into the server code, but I believe
that it's much more cleaner here: otherwise we'd need to adjust all
other paths *after* they were uncorrectly set by the application
init() code.
  • Loading branch information
elpaso committed Mar 1, 2018
1 parent 8873464 commit 1d7d51c
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/core/qgsapplication.cpp
Expand Up @@ -220,7 +220,12 @@ void QgsApplication::init( QString profileFolder )
setPrefixPath( myPrefix, true );
QDir myDir( applicationDirPath() );
// Fix for server wich is one level deeper in /usr/lib/cgi-bin
if ( applicationDirPath().contains( QStringLiteral( "cgi-bin" ) ) )
myDir.cdUp(); // Go from /usr/bin or /usr/lib (for server) to /usr
QString myPrefix = myDir.absolutePath();
setPrefixPath( myPrefix, true );
Expand Down

0 comments on commit 1d7d51c

Please sign in to comment.