Fix plugin crash if hosts directory doesn't exist

This commit is contained in:
rdb 2010-09-17 11:32:53 +00:00
parent a49e684dbe
commit 544b100908
1 changed files with 4 additions and 1 deletions

View File

@ -30,7 +30,10 @@ class ScanDirectoryNode:
self.fileSize = diskSpace
return
for vfile in vfs.scanDirectory(self.pathname):
files = vfs.scanDirectory(self.pathname)
if files is None:
files = []
for vfile in files:
if hasattr(vfile, 'getMount'):
if not isinstance(vfile.getMount(), VirtualFileMountSystem):
# Not a real file; ignore it.