Commit 07fcebbb authored by Martin Aumueller's avatar Martin Aumueller Committed by Matt Colyer

Don't crash when afc_get_dirlist returns NULL.

Signed-off-by: 's avatarMatt Colyer <matt@colyer.name>
parent ab40a42f
......@@ -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);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment