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

From: Dave Page <dpage(at)pgadmin(dot)org>
To: Peter Juhasz <pjuhasz(at)uhusystems(dot)com>
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 14:17:45
Message-ID: CA+OCxozAm0qZtvLOoTD2rBMnQZCPZo=UtFssomj467=a6R4fgg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-support

On Fri, Dec 2, 2016 at 10:39 AM, Peter Juhasz <pjuhasz(at)uhusystems(dot)com> wrote:
> 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?

Yes, if you use forward slashes and the same drive as the runtime is
on - but I see no reason that would be a real problem; it's not like
end users are supposed to need to touch this stuff.

--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Browse pgadmin-support by date

  From Date Subject
Next Message Dan Davis 2016-12-02 20:54:22 Question on deploy from wheel
Previous Message Peter Juhasz 2016-12-02 10:39:50 Re: PgAdmin4 STILL not usable when installed from RPMs on Fedora linux