diff options
| author | Maxime Coste <mawww@kakoune.org> | 2020-05-02 13:02:10 +1000 |
|---|---|---|
| committer | Maxime Coste <mawww@kakoune.org> | 2020-05-02 13:02:10 +1000 |
| commit | 2fca4e564304ee69b33711084ceeefae397619cd (patch) | |
| tree | f44597c62ee4d29137b78a24a36650712e89608c /src/commands.cc | |
| parent | ccecd5bd8e871b7aa89568609fd4ba7c50fd52ad (diff) | |
Fix traling whitespaces
Diffstat (limited to 'src/commands.cc')
| -rw-r--r-- | src/commands.cc | 2 |
1 files changed, 1 insertions, 1 deletions
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<String> 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"); |
