diff --git a/src/Buffer.cpp b/src/Buffer.cpp index ff303a7fa0..dc35734f6c 100644 --- a/src/Buffer.cpp +++ b/src/Buffer.cpp @@ -812,10 +812,9 @@ FileName Buffer::Impl::exportFileName() const if (branch_suffix.empty()) return filename; - string const name = filename.onlyFileNameWithoutExt() - + to_utf8(branch_suffix); + string const name = addExtension(filename.onlyFileNameWithoutExt() + + to_utf8(branch_suffix), filename.extension()); FileName res(filename.onlyPath().absFileName() + "/" + name); - res.changeExtension(filename.extension()); return res; }