diff options
| author | Maxime Coste <frrrwww@gmail.com> | 2014-06-29 22:03:59 +0100 |
|---|---|---|
| committer | Maxime Coste <frrrwww@gmail.com> | 2014-06-29 22:03:59 +0100 |
| commit | d6bb5b5a4b4b7147762a09e04fedb91ff2ee19f3 (patch) | |
| tree | 9a14d329839d45308427a4c06179bfed6c63c058 /src | |
| parent | df3bf7445dfd27389551e138333c1b42e92b30ab (diff) | |
Canonicalize filenames when checking if a buffer was written to its file
Diffstat (limited to 'src')
| -rw-r--r-- | src/file.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/file.cc b/src/file.cc index 8331c596..0c13c471 100644 --- a/src/file.cc +++ b/src/file.cc @@ -233,7 +233,8 @@ void write_buffer_to_file(Buffer& buffer, StringView filename) write(fd, eoldata, filename); } } - if ((buffer.flags() & Buffer::Flags::File) and filename == buffer.name()) + if ((buffer.flags() & Buffer::Flags::File) and + real_path(filename) == real_path(buffer.name())) buffer.notify_saved(); buffer.run_hook_in_own_context("BufWritePost", buffer.name()); |
