Deduplicate parsed list of plugin directories
See #3155 for context. It is also possible that someone might override the path with duplicate values. Note that the list of directories will lose its original ordering. That should be fine as we expect unique plugin paths: it is not a "preference list" (ordering should not matter). Closes #3155
This commit is contained in:
parent
9a15d787ac
commit
d0ad77f10d
|
|
@ -285,10 +285,10 @@ find_cuttlefish_schemas([], AllSchemas) ->
|
|||
lists:sort(fun(A,B) -> A < B end, AllSchemas).
|
||||
|
||||
list_apps(#{os_type := {win32, _}, plugins_path := PluginsPath}) ->
|
||||
PluginsDirs = string:lexemes(PluginsPath, ";"),
|
||||
PluginsDirs = lists:usort(string:lexemes(PluginsPath, ";")),
|
||||
list_apps1(PluginsDirs, []);
|
||||
list_apps(#{plugins_path := PluginsPath}) ->
|
||||
PluginsDirs = string:lexemes(PluginsPath, ":"),
|
||||
PluginsDirs = lists:usort(string:lexemes(PluginsPath, ":")),
|
||||
list_apps1(PluginsDirs, []).
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue