[LyX/master] Amend(3) 689f26d2: Add default path to server pipe (cmake build)
Enrico Forestieri
forenr at lyx.org
Sat Apr 18 15:45:58 UTC 2020
On Sat, Apr 18, 2020 at 04:14:00PM +0200, Kornel Benko wrote:
> commit 237378477f11026e8bd2cec389632d4ca410aef8
> Author: Kornel Benko <kornel at lyx.org>
> Date: Sat Apr 18 16:32:24 2020 +0200
>
> Amend(3) 689f26d2: Add default path to server pipe (cmake build)
>
> Omit duplicated separators if replacing string '$$User' with actual userdir
> ---
> src/LyXRC.cpp | 8 ++++++--
> 1 files changed, 6 insertions(+), 2 deletions(-)
>
> diff --git a/src/LyXRC.cpp b/src/LyXRC.cpp
> index 3b0add1..d5a7273 100644
> --- a/src/LyXRC.cpp
> +++ b/src/LyXRC.cpp
> @@ -669,9 +669,13 @@ LyXRC::ReturnValues LyXRC::read(Lexer & lexrc, bool check_format)
> break;
>
> case RC_SERVERPIPE:
> - if (lexrc.next())
> + if (lexrc.next()) {
> + string userdir = package().user_support().absFileName();
> + if (userdir.back() == '/')
> + userdir = userdir.substr(0, userdir.size()-1);
> lyxpipes = subst(os::internal_path(lexrc.getString()), "$$User",
> - package().user_support().absFileName());
> + userdir);
> + }
> break;
>
> case RC_CT_ADDITIONS_UNDERLINED:
Why don't you simply use support::addName?
--
Enrico
More information about the lyx-devel
mailing list