Allow the ApplicationPath to be absolute.

This commit is contained in:
Dave Page 2016-12-02 11:10:08 +09:00
parent 4bde18685b
commit 58910c4b62

View File

@ -218,7 +218,13 @@ bool Server::Init()
for (int i = 0; i < paths.size(); ++i)
{
QDir dir(QCoreApplication::applicationDirPath() + "/" + paths[i]);
QDir dir;
if (paths[i].startsWith('/'))
dir = paths[i];
else
dir = QCoreApplication::applicationDirPath() + "/" + paths[i];
m_appfile = dir.canonicalPath() + "/pgAdmin4.py";
if (QFile::exists(m_appfile))