]> git.lyx.org Git - lyx.git/commitdiff
Fix bug #11490
authorEnrico Forestieri <forenr@lyx.org>
Tue, 19 Feb 2019 18:51:11 +0000 (19:51 +0100)
committerEnrico Forestieri <forenr@lyx.org>
Tue, 19 Feb 2019 18:51:11 +0000 (19:51 +0100)
Correctly add the branch name suffix when the stem
of the filename contains a dot.

src/Buffer.cpp

index ff303a7fa0d63bd7d0e881edcf29962eade69a02..dc35734f6c466d1d600b2328b02fc702507f972f 100644 (file)
@@ -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;
 }