aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSulfurNitride <lukew19@proton.me>2026-06-19 22:39:25 -0500
committerSulfurNitride <lukew19@proton.me>2026-06-19 22:39:25 -0500
commita5144a78fc4dd61f90d1534d24057ad07978b5ac (patch)
treec24a032e914bcf9e8572a47e096571e8770cf8f3
parent41a336cc8e53ba062ab791ffd6dc9b90d2c72899 (diff)
Revert "Disable VFS cache for writable handles"
This reverts commit 41a336cc8e53ba062ab791ffd6dc9b90d2c72899.
-rw-r--r--src/src/vfs/mo2filesystem.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/src/vfs/mo2filesystem.cpp b/src/src/vfs/mo2filesystem.cpp
index d23c2e6..5176614 100644
--- a/src/src/vfs/mo2filesystem.cpp
+++ b/src/src/vfs/mo2filesystem.cpp
@@ -1930,11 +1930,7 @@ void mo2_open(fuse_req_t req, fuse_ino_t ino, struct fuse_file_info* fi)
}
fi->fh = fh;
- // Read-only mod/game files are immutable during a session, so keeping the
- // page cache is safe and fast. Writable handles can remap the same VFS inode
- // from a mod file to a staged copy, and repeated INI API calls need to read
- // the just-written staged content rather than stale cached pages.
- fi->keep_cache = writable ? 0 : 1;
+ fi->keep_cache = 1;
fuse_reply_open(req, fi);
}
@@ -2219,7 +2215,7 @@ void mo2_create(fuse_req_t req, fuse_ino_t parent, const char* name, mode_t mode
}
fi->fh = fh;
- fi->keep_cache = 0;
+ fi->keep_cache = 1;
struct fuse_entry_param e;
std::memset(&e, 0, sizeof(e));