diff --git a/src/ScanController.cpp b/src/ScanController.cpp index 503f5c8..f02038f 100644 --- a/src/ScanController.cpp +++ b/src/ScanController.cpp @@ -4,6 +4,7 @@ #include #include #include +#include #include #include #include @@ -174,10 +175,19 @@ ScanResult ApplyProxies() { SwapRequest request; std::map resolved; + std::set already; for (size_t index = 0; index < collected.objects.size(); index++) { const std::wstring& path = collected.files[index]; result.examined++; - if (IsProxyPath(path)) continue; + if (IsProxyPath(path)) { + if (already.insert(path).second) { + std::wstring source = SourceOfProxy(path); + std::wstring proxy; + if (!source.empty()) RegisterSource(source, proxy); + } + result.eligible++; + continue; + } auto cached = resolved.find(path); if (cached == resolved.end()) {