diff --git a/source/dub/packagemanager.d b/source/dub/packagemanager.d index 5eadc30..7a1ad3f 100644 --- a/source/dub/packagemanager.d +++ b/source/dub/packagemanager.d @@ -553,11 +553,9 @@ */ bool isManagedPath(NativePath path) const { - foreach (rep; m_repositories) { - NativePath rpath = rep.packagePath; - if (path.startsWith(rpath)) + foreach (rep; m_repositories) + if (rep.isManaged(path)) return true; - } return false; } @@ -1472,6 +1470,11 @@ result.endsWithSlash = true; return result; } + + /// Determines if a specific path is within a DUB managed Location. + bool isManaged(NativePath path) const { + return path.startsWith(this.packagePath); + } } private immutable string OverrideDepMsg =