scripting/source/pyprov/pythonscript.py |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 478583be4c384c1679c03a83662c29c526e426a7
Author:     Chenxiong Qi <[email protected]>
AuthorDate: Sat Aug 30 10:51:07 2025 +0800
Commit:     Ilmari Lauhakangas <[email protected]>
CommitDate: Thu Oct 23 21:16:23 2025 +0200

    Don't treat __pycache__ dir as a DirBrowseNode
    
    Signed-off-by: Chenxiong Qi <[email protected]>
    Change-Id: Ie1026fc5f34adb307773ef15ff8e79d035adac0f
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/190404
    Reviewed-by: Ilmari Lauhakangas <[email protected]>
    Tested-by: Jenkins

diff --git a/scripting/source/pyprov/pythonscript.py 
b/scripting/source/pyprov/pythonscript.py
index c6cf8efbb7e0..d2a57760833b 100644
--- a/scripting/source/pyprov/pythonscript.py
+++ b/scripting/source/pyprov/pythonscript.py
@@ -688,7 +688,7 @@ class DirBrowseNode(unohelper.Base, XBrowseNode):
                 if i.endswith(".py"):
                     log.debug("adding filenode " + i)
                     browseNodeList.append(FileBrowseNode(self.provCtx, i, 
i[i.rfind("/") + 1 : len(i) - 3]))
-                elif self.provCtx.sfa.isFolder(i) and not 
i.endswith("/pythonpath"):
+                elif self.provCtx.sfa.isFolder(i) and not 
(i.endswith("/pythonpath") or i.endswith("/__pycache__")):
                     log.debug("adding DirBrowseNode " + i)
                     browseNodeList.append(DirBrowseNode(self.provCtx, 
i[i.rfind("/") + 1 : len(i)], i))
             return tuple(browseNodeList)

Reply via email to