Re: PgAdmin4 STILL not usable when installed from RPMs on Fedora linux
От | Dave Page |
---|---|
Тема | Re: PgAdmin4 STILL not usable when installed from RPMs on Fedora linux |
Дата | |
Msg-id | CA+OCxozAm0qZtvLOoTD2rBMnQZCPZo=UtFssomj467=a6R4fgg@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: PgAdmin4 STILL not usable when installed from RPMs on Fedora linux (Peter Juhasz <pjuhasz@uhusystems.com>) |
Список | pgadmin-support |
On Fri, Dec 2, 2016 at 10:39 AM, Peter Juhasz <pjuhasz@uhusystems.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@uhusystems.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
В списке pgadmin-support по дате отправления: