On Thursday, February 4, 2021 at 7:15:33 PM UTC-5 brian wrote:

> The dev has the same problem as 6.3.  I did a diff between the dev and 
> 6.3.  The changes are trivial and are limited to the import part.  The 
> problem method is createDirectoryForFile.  The createDirectoryForFile 
> method has the exact same code in both the dev and 6.3 branches.
>
> The method has:
> -------------------
> def createDirectoryForFile(self, fn):
>         ...
>         if c and c.config and c.config.create_nonexistent_directories:
>             theDir = c.expand_path_expression(theDir)
>             ok = g.makeAllNonExistentDirectories(theDir)
>             if not ok:
>                 g.error('did not create:', theDir)
>         return ok
> -------------------
>
> To get a return value for OK, "c and c.config and 
> c.config.create_nonexistent_directories" has to be true.  When I ran 
> through a debugger, c.config.create_nonexistent_directories is false thus 
> throwing the exception since ok is never defined.
>

Yes, that was the obvious bug I saw in the release version.    *ok* needs 
to be created before the *if* statement.   
 

> Also, the fn parameter has a value of 
> '/home/brian/pyDev/yLeoBook/leo/dev/leo/doc/c:/test/test.html'.  "C:" is a 
> Windows drive letter.  The doc has a hard coded windows dir: 
> /home/brian/pyDev/yLeoBook/leo/dev/leo/doc/LeoDocs.leo#Leo's 
> Documentation-->How to...-->How to generate odt/rtf/pdf files-->@rst 
> c:/test/test.html.  
>

I just fired up my Linux Mint VM, and I reproduced your error including the 
*c:/test* part of the directory path. And I do see that the path error 
comes from the headline of the file *@rst /home/tom/test/test.html*.  
Strangely, when I edited the path to */home/tom/test/test.html*, there was 
no error but also no file in the */home/tom/test* directory.

I'd say you could definitely file a new issue over at GitHub.

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/a53593ac-e6f4-4933-a31a-8869f7af6e2fn%40googlegroups.com.

Reply via email to