File httpfs-errno of Package httpfs
diff -ur httpfs2-0.1.5/httpfs2.c httpfs2-0.1.5/httpfs2.c
--- httpfs2-0.1.5/httpfs2.c 2025-10-02 12:48:21.586813400 +0200
+++ httpfs2-0.1.5/httpfs2.c 2025-10-02 12:45:10.182622118 +0200
@@ -229,8 +229,7 @@
break;
default:
- errno = ENOENT;
- return -1;
+ return ENOENT;
}
return 0;
}
@@ -239,12 +238,14 @@
struct fuse_file_info *fi)
{
struct stat stbuf;
+ int ret;
(void) fi;
memset(&stbuf, 0, sizeof(stbuf));
- if (httpfs_stat(ino, &stbuf) < 0)
- assert(errno),fuse_reply_err(req, errno);
+ ret = httpfs_stat(ino, &stbuf);
+ if (ret)
+ fuse_reply_err(req, ret);
else
fuse_reply_attr(req, &stbuf, 1.0);
}
@@ -259,10 +260,12 @@
if (parent != 1 || strcmp(name, main_url.name) != 0){
e.ino = 0;
} else {
+ int ret;
+
e.ino = 2;
- if(httpfs_stat(e.ino, &e.attr) < 0){
- assert(errno);
- fuse_reply_err(req, errno);
+ ret = httpfs_stat(e.ino, &e.attr);
+ if(ret){
+ fuse_reply_err(req, ret);
return;
}