]> rtime.felk.cvut.cz Git - coffee/buildroot.git/blob - package/ejabberd/0008-handle-error-case-from-lib_dir.patch
lrzsz: install symlinks for XMODEM and YMODEM
[coffee/buildroot.git] / package / ejabberd / 0008-handle-error-case-from-lib_dir.patch
1 From d0bfcbbfd8a6e7ee6213112e4078b020e4e1d15d Mon Sep 17 00:00:00 2001
2 From: PaweÅ‚ Chmielowski <pchmielowski@process-one.net>
3 Date: Wed, 10 Jan 2018 16:34:01 +0100
4 Subject: [PATCH] Handle error case from code:lib_dir in ResolveDepPath in
5  rebar.config.script
6
7 This patch have already been applied in upstream/master.
8
9 Signed-off-by: PaweÅ‚ Chmielowski <pchmielowski@process-one.net>
10
11 ---
12  rebar.config.script | 7 ++++---
13  1 file changed, 4 insertions(+), 3 deletions(-)
14
15 diff --git a/rebar.config.script b/rebar.config.script
16 index 85f918fffd..ba374e5c5f 100644
17 --- a/rebar.config.script
18 +++ b/rebar.config.script
19 @@ -233,9 +233,10 @@ ResolveDepPath = case {SystemDeps, IsRebar3} of
20                      {true, _} ->
21                          fun("deps/" ++ Rest) ->
22                                  Slash = string:str(Rest, "/"),
23 -                                code:lib_dir(
24 -                                  string:sub_string(Rest, 1, Slash -1)) ++
25 -                                    string:sub_string(Rest, Slash);
26 +                                case code:lib_dir(string:sub_string(Rest, 1, Slash -1)) of
27 +                                    {error, _} -> Rest;
28 +                                    V -> V ++ string:sub_string(Rest, Slash)
29 +                                end;
30                             (Path) ->
31                                  Path
32                          end;