Skip to content
Permalink
Browse files

[bugfix][server] Fix prefix path for server

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 1d7d51c8e193638f99dd6437db2791a0670d3393
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 wich 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 1d7d51c

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