From: Dongju Chae Date: Thu, 23 Jan 2020 08:16:07 +0000 (+0900) Subject: [Fix] Skip duplicated paths from multiple conf sources X-Git-Tag: v1.3.0~12 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f9cd5cae22fe397c0793688864c42e82c98e15c6;p=platform%2Fupstream%2Fnnstreamer.git [Fix] Skip duplicated paths from multiple conf sources This commit skips duplicated paths from multiple conf sources. Signed-off-by: Dongju Chae --- diff --git a/gst/nnstreamer/nnstreamer_conf.c b/gst/nnstreamer/nnstreamer_conf.c index f73d6dc..ad4f25c 100644 --- a/gst/nnstreamer/nnstreamer_conf.c +++ b/gst/nnstreamer/nnstreamer_conf.c @@ -254,12 +254,19 @@ _fill_in_vstr (gchar *** fullpath_vstr, gchar *** basename_vstr, { GSList *lstF = NULL, *lstB = NULL; vstr_helper vstrF, vstrB; - guint i, counter; + guint i, j, counter; counter = 0; for (i = 0; i < CONF_SOURCE_END; i++) { if (searchpath[i]) { - _get_filenames (type, searchpath[i], &lstF, &lstB, &counter); + /* skip duplicated paths */ + for (j = i + 1; j < CONF_SOURCE_END; j++) { + if (searchpath[j] && !g_strcmp0 (searchpath[i], searchpath[j])) { + break; + } + } + if (j == CONF_SOURCE_END) + _get_filenames (type, searchpath[i], &lstF, &lstB, &counter); } }