Don't crash when afc_get_dirlist returns NULL.

Signed-off-by: Matt Colyer <matt@colyer.name>
This commit is contained in:
Martin Aumueller
2008-08-03 17:26:30 +02:00
committed by Matt Colyer
parent ab40a42f43
commit 07fcebbb5e
+4
View File
@@ -69,6 +69,10 @@ static int ifuse_readdir(const char *path, void *buf, fuse_fill_dir_t filler,
AFClient *afc = fuse_get_context()->private_data;
dirs = afc_get_dir_list(afc, path);
if(!dirs)
return -ENOENT;
for (i = 0; strcmp(dirs[i], ""); i++) {
filler(buf, dirs[i], NULL, 0);
}