Tom, 

It's fun and I enjoy the challenges. I've got a few other open source 
projects out there but with WordPress plugins published in their directory. 
The problem is there's not enough time in the day to maintain them all!

I can give it a try to rename the skin directories as you suggest and give 
it a test. 

Thanks for checking it out. 

 

On Thursday, September 6, 2018 at 8:40:42 AM UTC-4, Tom Keffer wrote:
>
> That sounds like a reasonable analysis. 
>
> This is an obscure problem. Can we just use a workaround and call the two 
> skins "Belchertown" and "Highcharts_Belchertown," or something similar? 
>
> BTW, Pat, how are you enjoying your new life as a maintainer of open 
> source code? :-)
>
> -tk
>
> On Thu, Sep 6, 2018 at 1:56 AM gjr80 <[email protected] <javascript:>> 
> wrote:
>
>> Yep, did the same for me. Wanted to understand why WeeWX-WD never had the 
>> problem, first thought was what user was running wee_extension, dead 
>> end. Then I wondered if the json sub-directory was doing it. I had a quick 
>> look at the extension.py code, I hadn't come across 
>> os.path.commonprefix() before so googled it. os.path.commonprefix() 
>> checks a list of paths and returns the longest common prefix and it does 
>> this by doing a character-by-character comparison, when I saw the warning 
>> that it could return invalid paths that peaked my curiosity. In the case of 
>> your extension /home/weewx/skins/Belchertown is the result, so 
>> extension.py then works from /home/weewx/skins/Belchertown down and thus 
>> /home/weewx/skins/Belchertown_Highcharts is ignored. I did some 
>> rejigging of your extension so that it used 
>> /home/weewx/skins/ZBelchertown_Highcharts instead and it worked fine. 
>> That explains why WeeWX-WD was never affected, all of its skin directory 
>> names had no common prefix. Probably more correctly (and I didn't check 
>> this) but the fact that the common prefix includes the name of one of the 
>> skin directories (Belchertown) may be the cause. 
>>
>> No matter, its a bug that needs to be fixed. Can't comment on the 
>> proposed fix, better for Tom or Matthew I think.
>>
>> Gary
>>
>

Reply via email to