Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1aH2kG-000647-Nz for pgadmin-hackers@arkaria.postgresql.org; Thu, 07 Jan 2016 05:04:20 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1aH2kG-00067x-5N for pgadmin-hackers@arkaria.postgresql.org; Thu, 07 Jan 2016 05:04:20 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1aH2kF-00067q-MC for pgadmin-hackers@postgresql.org; Thu, 07 Jan 2016 05:04:19 +0000 Received: from palladium.wars-nicht.de ([89.238.64.91] helo=polonium.wars-nicht.de) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1aH2kC-0006Ft-Tx for pgadmin-hackers@postgresql.org; Thu, 07 Jan 2016 05:04:18 +0000 Received: from localhost (localhost [127.0.0.1]) by polonium.wars-nicht.de (Postfix) with ESMTP id C2F3F114037 for ; Thu, 7 Jan 2016 06:04:14 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at polonium X-Spam-Flag: NO X-Spam-Score: -2.9 X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5 tests=[ALL_TRUSTED=-1, BAYES_00=-1.9] autolearn=ham autolearn_force=no Received: from polonium.wars-nicht.de ([127.0.0.1]) by localhost (polonium.wars-nicht.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id FtZsG00M7LFM for ; Thu, 7 Jan 2016 06:04:14 +0100 (CET) Received: from diamond.wars-nicht.de (unknown [216.3.10.6]) by polonium.wars-nicht.de (Postfix) with ESMTPSA id AF2B9114036 for ; Thu, 7 Jan 2016 06:04:13 +0100 (CET) Received: from [127.0.0.1] (localhost [127.0.0.1]) by diamond.wars-nicht.de (Postfix) with ESMTP id 04C0A1BE0228 for ; Thu, 7 Jan 2016 06:04:12 +0100 (CET) Subject: Re: CleanHelpPath & index.html To: pgadmin-hackers@postgresql.org References: <568D8B8A.10804@wars-nicht.de> From: Andreas 'ads' Scherbaum Message-ID: <568DF1CB.3040704@wars-nicht.de> Date: Thu, 7 Jan 2016 06:04:11 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0 MIME-Version: 1.0 In-Reply-To: <568D8B8A.10804@wars-nicht.de> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgadmin-hackers Precedence: bulk Sender: pgadmin-hackers-owner@postgresql.org On 06.01.2016 22:47, Andreas 'ads' Scherbaum wrote: > > looking into misc.cpp, around line 661, there is CleanHelpPath. When I > try to add a documentation link ending with "index.html", this function > incorrectly assumes that it must be a directory and adds a "/" (or > whatever the current separator is). > > This even happens when the correct link is in ~/.pgadmin3. The link is > then read from the config file, cleaned up incorrectly and when I try to > open the help link, it points to the wrong URL (index.html/). > > Attached is a small patch which checks a string in CleanHelpPath if it > ends in one of the most common file types (.htm, .html, .php and .asp) > and if this is the case, the string is returned as is. Actually, screw this patch. pgAdmin3::InitHelp() does some very obscure magic if a path ends on "index.html", but only for ".html", not for other endings. I don't know why the old Greenplum documentation link worked before - it ends in "index.html". It definitely does not work anymore, but that is another patch. -- Andreas 'ads' Scherbaum German PostgreSQL User Group European PostgreSQL User Group - Board of Directors Volunteer Regional Contact, Germany - PostgreSQL Project -- Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgadmin-hackers