fix bug with write permission for files with autogen getattr

(fixes bug with writing to `TAB/active` from Emacs Lisp, which checks
permission instead of just trying to write)
This commit is contained in:
Omar Rizwan 2021-02-19 09:26:20 -08:00
parent 248d416c0c
commit 2215ba8e41
1 changed files with 1 additions and 1 deletions

View File

@ -633,7 +633,7 @@ for (let key in router) {
router[key] = {
async getattr() {
return {
st_mode: unix.S_IFREG | ((router[key].read && 0444) || (router[key].write && 0222)),
st_mode: unix.S_IFREG | ((router[key].read && 0444) | (router[key].write && 0222)),
st_nlink: 1,
st_size: 100 // FIXME
};