ftpfs_readdir: specify all parameters to filler

else they may be filled with garbage instead
This commit is contained in:
2024-10-23 10:02:49 +00:00
parent 8f2d6449f7
commit 761dac3d64
3 changed files with 4 additions and 6 deletions

View File

@@ -18,8 +18,6 @@
#define CACHE_CLEAN_INTERVAL 60
typedef struct fuse_cache_dirhandle *fuse_cache_dirh_t;
typedef int (*fuse_cache_dirfil_t) (fuse_cache_dirh_t h, const char *name,
const struct stat *stbuf);
struct fuse_cache_operations {
struct fuse_operations oper;

View File

@@ -190,7 +190,7 @@ static int parse_dir_netware(const char *line,
int parse_dir(const char* list, const char* dir,
const char* name, struct stat* sbuf,
char* linkbuf, int linklen,
void *dbuf, fuse_cache_dirfil_t filler) {
void *dbuf, fuse_fill_dir_t filler) {
char *file;
char *link;
const char *start = list;
@@ -255,7 +255,7 @@ int parse_dir(const char* list, const char* dir,
if (dbuf && filler) {
DEBUG(1, "filler: %s\n", file);
filler(dbuf, file, &stat_buf);
filler(dbuf, file, &stat_buf, 0, 0);
} else {
DEBUG(1, "cache_add_attr: %s\n", full_path);
cache_add_attr(full_path, &stat_buf);

View File

@@ -9,11 +9,11 @@
See the file COPYING.
*/
#include "cache.h"
#include <fuse.h>
int parse_dir(const char* list, const char* dir,
const char* name, struct stat* sbuf,
char* linkbuf, int linklen,
void *dbuf, fuse_cache_dirfil_t filler);
void *dbuf, fuse_fill_dir_t filler);
#endif /* __CURLFTPFS_FTPFS_LS_H__ */