You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pylucene-dev@lucene.apache.org by Petrus Hyvönen <pe...@gmail.com> on 2017/09/22 09:10:50 UTC

Note/Bug JCC, dots in pathnames

Hi,

Not sure this is a bug or just a note, there seems to be some issues with
running JCC in a directory that contains dots. I agree this is not a
recommended thing for paths in general, but can happen sometimes.

I think its the line 1677 in python.py that gets problems:
shutil.copy2(module.split('.')[0] + '.py', modulePath)

I'm not sure what this section of code does, but maybe joining all parts
but the last would work, like

'.'.join(module.split('.')[:-1])

Regards
/Petrus



-- 
_____________________________________________
Petrus Hyvönen, Uppsala, Sweden
Mobile Phone/SMS:+46 73 803 19 00

Re: Note/Bug JCC, dots in pathnames

Posted by Andi Vajda <va...@apache.org>.
On Fri, 22 Sep 2017, Petrus Hyvönen wrote:

> Hi,
>
> Not sure this is a bug or just a note, there seems to be some issues with
> running JCC in a directory that contains dots. I agree this is not a
> recommended thing for paths in general, but can happen sometimes.
>
> I think its the line 1677 in python.py that gets problems:
> shutil.copy2(module.split('.')[0] + '.py', modulePath)
>
> I'm not sure what this section of code does, but maybe joining all parts
> but the last would work, like
>
> '.'.join(module.split('.')[:-1])

The proper fix is to use rpartition('.')[0], trying it now..
Thank you for the bug report !

Andi..

>
> Regards
> /Petrus
>
>
>
> -- 
> _____________________________________________
> Petrus Hyvönen, Uppsala, Sweden
> Mobile Phone/SMS:+46 73 803 19 00
>