aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/ex_cmds.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/ex_cmds.c')
-rw-r--r--src/nvim/ex_cmds.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nvim/ex_cmds.c b/src/nvim/ex_cmds.c
index cacef01b19..802a378b07 100644
--- a/src/nvim/ex_cmds.c
+++ b/src/nvim/ex_cmds.c
@@ -2395,7 +2395,7 @@ static int check_readonly(int *forceit, buf_T *buf)
* the file exists and permissions are read-only. */
if (!*forceit && (buf->b_p_ro
|| (os_file_exists(buf->b_ffname)
- && os_file_is_readonly((char *)buf->b_ffname)))) {
+ && !os_file_is_writable((char *)buf->b_ffname)))) {
if ((p_confirm || cmdmod.confirm) && buf->b_fname != NULL) {
char_u buff[DIALOG_MSG_SIZE];