From 642251b2dd2790105d2eacaccdb17519d61ed02c Mon Sep 17 00:00:00 2001 From: arch1t3cht Date: Thu, 26 Jan 2023 20:52:20 +0100 Subject: [PATCH] Deduplicate automation autoload path Fixes TypesettingTools/Aegisub#168 Fixes arch1t3cht/Aegisub#15 --- src/auto4_base.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/auto4_base.cpp b/src/auto4_base.cpp index 388e1fa3d..e3a796f73 100644 --- a/src/auto4_base.cpp +++ b/src/auto4_base.cpp @@ -322,7 +322,8 @@ namespace Automation4 { std::vector>> script_futures; - for (auto tok : agi::Split(path, '|')) { + auto path_it = agi::Split(path, '|'); + for (auto tok : std::set(begin(path_it), end(path_it))) { auto dirname = config::path->Decode(agi::str(tok)); if (!agi::fs::DirectoryExists(dirname)) continue;