From 2fca4e564304ee69b33711084ceeefae397619cd Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Sat, 2 May 2020 13:02:10 +1000 Subject: Fix traling whitespaces --- src/commands.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/commands.cc') diff --git a/src/commands.cc b/src/commands.cc index 30113af2..accb3e37 100644 --- a/src/commands.cc +++ b/src/commands.cc @@ -480,7 +480,7 @@ void do_write_buffer(Context& context, Optional filename, WriteFlags fla const bool is_readonly = (bool)(context.buffer().flags() & Buffer::Flags::ReadOnly); // if the buffer is in read-only mode and we try to save it directly // or we try to write to it indirectly using e.g. a symlink, throw an error - if (is_file and is_readonly and + if (is_file and is_readonly and (not filename or real_path(*filename) == buffer.name())) throw runtime_error("cannot overwrite the buffer when in readonly mode"); -- cgit v1.2.3