Browse Source

Fix plugin crash if hosts directory doesn't exist

rdb 15 years ago
parent
commit
544b100908
1 changed files with 4 additions and 1 deletions
  1. 4 1
      direct/src/p3d/ScanDirectoryNode.py

+ 4 - 1
direct/src/p3d/ScanDirectoryNode.py

@@ -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.