mirror of
https://github.com/falk-werner/webfuse
synced 2024-10-27 20:34:10 +00:00
fixes missing inode using stat and ls -i
This commit is contained in:
parent
973f95f30b
commit
83c7feee82
@ -14,6 +14,7 @@
|
||||
struct wf_impl_operation_getattr_context
|
||||
{
|
||||
fuse_req_t request;
|
||||
fuse_ino_t inode;
|
||||
double timeout;
|
||||
uid_t uid;
|
||||
gid_t gid;
|
||||
@ -36,6 +37,7 @@ static void wf_impl_operation_getattr_finished(
|
||||
{
|
||||
memset(&buffer, 0, sizeof(struct stat));
|
||||
|
||||
buffer.st_ino = context->inode;
|
||||
buffer.st_mode = json_integer_value(mode_holder) & 0555;
|
||||
char const * type = json_string_value(type_holder);
|
||||
if (0 == strcmp("file", type))
|
||||
@ -54,7 +56,6 @@ static void wf_impl_operation_getattr_finished(
|
||||
buffer.st_atime = wf_impl_json_get_int(data, "atime", 0);
|
||||
buffer.st_mtime = wf_impl_json_get_int(data, "mtime", 0);
|
||||
buffer.st_ctime = wf_impl_json_get_int(data, "ctime", 0);
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -87,6 +88,7 @@ void wf_impl_operation_getattr (
|
||||
{
|
||||
struct wf_impl_operation_getattr_context * getattr_context = malloc(sizeof(struct wf_impl_operation_getattr_context));
|
||||
getattr_context->request = request;
|
||||
getattr_context->inode = inode;
|
||||
getattr_context->uid = context->uid;
|
||||
getattr_context->gid = context->gid;
|
||||
getattr_context->timeout = user_data->timeout;
|
||||
|
@ -43,6 +43,7 @@ static void wf_impl_operation_lookup_finished(
|
||||
memset(&buffer, 0, sizeof(struct stat));
|
||||
|
||||
buffer.ino = json_integer_value(inode_holder);
|
||||
buffer.attr.st_ino = buffer.ino;
|
||||
buffer.attr.st_mode = json_integer_value(mode_holder) & 0555;
|
||||
char const * type = json_string_value(type_holder);
|
||||
if (0 == strcmp("file", type))
|
||||
|
Loading…
Reference in New Issue
Block a user