Skip to content

Commit

Permalink
Merge pull request #6502 from elpaso/bugfix-18230-server-prefix-path
Browse files Browse the repository at this point in the history
[bugfix][server] Fix prefix path for server
  • Loading branch information
elpaso committed Mar 1, 2018
2 parents 4f4b831 + 0050eb5 commit baeaeac
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 );
#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
Expand Down

0 comments on commit baeaeac

Please sign in to comment.