Merge branch 'fixes' into feature
This commit is contained in:
commit
61ec2bc3e7
1 changed files with 5 additions and 2 deletions
|
@ -316,11 +316,14 @@ namespace Automation4 {
|
|||
|
||||
std::vector<std::future<std::unique_ptr<Script>>> script_futures;
|
||||
|
||||
auto path_it = agi::Split(path, '|');
|
||||
for (auto tok : std::set<agi::StringRange>(begin(path_it), end(path_it))) {
|
||||
std::set<agi::fs::path> dirnames;
|
||||
for (auto tok : agi::Split(path, '|')) {
|
||||
auto dirname = config::path->Decode(agi::str(tok));
|
||||
if (!agi::fs::DirectoryExists(dirname)) continue;
|
||||
|
||||
if (dirnames.count(dirname)) continue;
|
||||
dirnames.insert(dirname);
|
||||
|
||||
for (auto filename : agi::fs::DirectoryIterator(dirname, "*.*"))
|
||||
script_futures.emplace_back(std::async(std::launch::async, [=] {
|
||||
return ScriptFactory::CreateFromFile(dirname/filename, false, false);
|
||||
|
|
Loading…
Reference in a new issue