Auto-commit fuse.cpp

This commit is contained in:
Antonio SJ Musumeci 2026-04-13 18:55:56 -05:00
parent d5a2187713
commit 02da8efbff
37 changed files with 374 additions and 267 deletions

View file

@ -84,18 +84,24 @@ _handle_ENOENT(const fuse_file_info_t *ffi_,
dirent de;
DirInfo *di = DirInfo::from_fh(ffi_->fh);
if(not di)
return -EBADF;
if(!di->fusepath.empty())
return -ENOENT;
constexpr const char msg[] =
"error: no valid mergerfs branch found, check config";
de = {};
de.d_ino = 0;
de.d_off = 0;
de.d_type = DT_UNKNOWN;
strcpy(de.d_name,"error: no valid mergerfs branch found, check config");
strncpy(de.d_name,msg,(sizeof(msg) - 1));
de.d_reclen = sizeof(de);
fuse_dirents_add(buf_,&de,::strlen(de.d_name));
fuse_dirents_add(buf_,&de,(sizeof(msg) - 1));
return 0;
}