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;