Re: PgAdmin4 STILL not usable when installed from RPMs on Fedora linux

From: Peter Juhasz <pjuhasz(at)uhusystems(dot)com>
To: Dave Page <dpage(at)pgadmin(dot)org>
Cc: Devrim Gündüz <devrim(at)gunduz(dot)org>, pgAdmin Support <pgadmin-support(at)postgresql(dot)org>
Subject: Re: PgAdmin4 STILL not usable when installed from RPMs on Fedora linux
Date: 2016-12-02 10:39:50
Message-ID: 1480675190.2412.4.camel@uhusystems.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-support

On Fri, 2016-12-02 at 01:16 +0000, Dave Page wrote:
> On Thu, Dec 1, 2016 at 12:14 PM, Peter Juhasz <pjuhasz(at)uhusystems(dot)com
> > wrote:
[...]

> > Apparently the ApplicationPath setting must be a relative path,
> > absolute paths don't work (because of a bug at Server.cpp:221 where
> > the
> > code just blindly concatenates the config's Application path to the
> > runtime's own directory - if Application path is an absolute path,
> > it
> > should be used as is).
>
> You're suggesting a fix such as this?
>
> snake:pgadmin4 dpage$ git diff
> diff --git a/runtime/Server.cpp b/runtime/Server.cpp
> index 3a4c660..e631872 100644
> --- a/runtime/Server.cpp
> +++ b/runtime/Server.cpp
> @@ -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))
>

Yes - but does this work on Windows?

best regards,
Peter Juhasz

In response to

Responses

Browse pgadmin-support by date

  From Date Subject
Next Message Dave Page 2016-12-02 14:17:45 Re: PgAdmin4 STILL not usable when installed from RPMs on Fedora linux
Previous Message Dave Page 2016-12-02 01:16:15 Re: PgAdmin4 STILL not usable when installed from RPMs on Fedora linux