From 2f3efb9100f51833f12f244e993155b85fa59621 Mon Sep 17 00:00:00 2001 From: SulfurNitride Date: Sun, 8 Mar 2026 01:25:22 -0600 Subject: Remove FUSE passthrough (CAP_SYS_ADMIN incompatible with AppImage), remove bsplugins, fix bsatk types - Remove FUSE passthrough code: requesting FUSE_CAP_PASSTHROUGH without CAP_SYS_ADMIN caused session cleanup crash on shutdown - Remove bsplugins library (unneeded port) - Fix bsatk: use uint32_t instead of unsigned long for BSAULong (LP64 compat) Co-Authored-By: Claude Opus 4.6 --- src/src/vfs/mo2filesystem.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/src/vfs/mo2filesystem.cpp b/src/src/vfs/mo2filesystem.cpp index 4d71444..35a0098 100644 --- a/src/src/vfs/mo2filesystem.cpp +++ b/src/src/vfs/mo2filesystem.cpp @@ -509,8 +509,10 @@ void updateFileNode(Mo2FsContext* ctx, const std::string& relative, } // namespace -void mo2_init(void* /*userdata*/, struct fuse_conn_info* conn) +void mo2_init(void* userdata, struct fuse_conn_info* conn) { + auto* ctx = static_cast(userdata); + // Keep kernel page cache valid across open/close as long as mtime/size are // unchanged. Mod files are immutable during a game session, so this avoids // re-reading file data from userspace on every open(). @@ -904,6 +906,7 @@ void mo2_open(fuse_req_t req, fuse_ino_t ino, struct fuse_file_info* fi) } int fd = -1; + if (writable) { const int openFlags = O_RDWR; if (isBacking && ctx->backing_dir_fd >= 0) { @@ -929,7 +932,7 @@ void mo2_open(fuse_req_t req, fuse_ino_t ino, struct fuse_file_info* fi) ctx->open_files[fh] = std::move(of); } - fi->fh = fh; + fi->fh = fh; fi->keep_cache = 1; fuse_reply_open(req, fi); } -- cgit v1.3.1