mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 10:00:33 +00:00
parent
7a60c96dfa
commit
671c7e12e5
@ -942,11 +942,11 @@ docstring const makeDisplayPath(string const & path, unsigned int threshold)
|
||||
if (dstr.empty()) {
|
||||
// Yes, filename itself is too long.
|
||||
// Pick the start and the end of the filename.
|
||||
dstr = from_utf8(onlyFileName(path));
|
||||
docstring::size_type const len = dstr.length();
|
||||
if (len >= threshold)
|
||||
dstr = support::truncateWithEllipsis(dstr, threshold / 2) +
|
||||
dstr.substr(len - threshold / 2 - 2, len - 1);
|
||||
docstring fstr = from_utf8(onlyFileName(path));
|
||||
dstr = fstr;
|
||||
if (support::truncateWithEllipsis(dstr, threshold / 2))
|
||||
dstr += fstr.substr(fstr.length() - threshold / 2 - 2,
|
||||
docstring::npos);
|
||||
}
|
||||
|
||||
return from_utf8(os::external_path(prefix + to_utf8(dstr)));
|
||||
|
Loading…
Reference in New Issue
Block a user