Don't treat __pycache__ dir as a DirBrowseNode
Signed-off-by: Chenxiong Qi <qcxhome@gmail.com> Change-Id: Ie1026fc5f34adb307773ef15ff8e79d035adac0f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/190404 Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org> Tested-by: Jenkins
This commit is contained in:
committed by
Ilmari Lauhakangas
parent
ed663ada46
commit
478583be4c
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user