mirror of
https://github.com/trapexit/mergerfs.git
synced 2026-10-26 19:01:56 -04:00
Auto-commit fuse.cpp
This commit is contained in:
parent
d5a2187713
commit
02da8efbff
37 changed files with 374 additions and 267 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue