diff --git a/src/add-ons/kernel/file_systems/userlandfs/server/beos/BeOSKernelVolume.cpp b/src/add-ons/kernel/file_systems/userlandfs/server/beos/BeOSKernelVolume.cpp index 5c7202cf90..f37730dbb7 100644 --- a/src/add-ons/kernel/file_systems/userlandfs/server/beos/BeOSKernelVolume.cpp +++ b/src/add-ons/kernel/file_systems/userlandfs/server/beos/BeOSKernelVolume.cpp @@ -604,7 +604,7 @@ BeOSKernelVolume::ReadAttr(void* node, void* _cookie, off_t pos, AttributeCookie* cookie = (AttributeCookie*)_cookie; // check, if open mode allows reading - if ((open_mode_to_access(cookie->fOpenMode) | R_OK) == 0) + if ((open_mode_to_access(cookie->fOpenMode) & R_OK) == 0) return B_FILE_ERROR; // read @@ -624,7 +624,7 @@ BeOSKernelVolume::WriteAttr(void* node, void* _cookie, off_t pos, AttributeCookie* cookie = (AttributeCookie*)_cookie; // check, if open mode allows writing - if ((open_mode_to_access(cookie->fOpenMode) | W_OK) == 0) + if ((open_mode_to_access(cookie->fOpenMode) & W_OK) == 0) return B_FILE_ERROR; // write