diff options
Diffstat (limited to 'backends/fs/posix')
-rw-r--r-- | backends/fs/posix/posix-fs.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/backends/fs/posix/posix-fs.cpp b/backends/fs/posix/posix-fs.cpp index d74bfdca57..23ad5786fe 100644 --- a/backends/fs/posix/posix-fs.cpp +++ b/backends/fs/posix/posix-fs.cpp @@ -95,10 +95,11 @@ FSList *POSIXFilesystemNode::listDir(ListMode mode) const { assert(_isDirectory); DIR *dirp = opendir(_path.c_str()); struct stat st; - assert(dirp != 0); struct dirent *dp; FSList *myList = new FSList(); + + if (dirp == NULL) return myList; // ... loop over dir entries using readdir while ((dp = readdir(dirp)) != NULL) { |