Canonicalize filenames when checking if a buffer was written to its file

This commit is contained in:
Maxime Coste 2014-06-29 22:03:59 +01:00
parent df3bf7445d
commit d6bb5b5a4b

View File

@ -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());