diff --git a/source/dub/packagemanager.d b/source/dub/packagemanager.d index 74b8542ef..9150a6231 100644 --- a/source/dub/packagemanager.d +++ b/source/dub/packagemanager.d @@ -428,9 +428,6 @@ class PackageManager { string gitReference = repo.ref_.chompPrefix("~"); NativePath destination = this.getPackagePath(PlacementLocation.user, name, repo.ref_); - // For libraries leaking their import path - destination ~= name; - destination.endsWithSlash = true; foreach (p; getPackageIterator(name)) { if (p.path == destination) { @@ -724,8 +721,6 @@ class PackageManager { { NativePath dstpath = this.getPackagePath(dest, name, vers.toString()); ensureDirectory(dstpath); - // For libraries leaking their import path - dstpath = dstpath ~ name; // possibly wait for other dub instance import core.time : seconds; @@ -1440,7 +1435,7 @@ package struct Location { string versStr = vers.toString(); const lookupName = getBasePackageName(name); - const path = this.getPackagePath(lookupName, versStr) ~ (lookupName ~ "/"); + const path = this.getPackagePath(lookupName, versStr); if (!path.existsDirectory()) return null; @@ -1461,13 +1456,12 @@ package struct Location { * which expects their containing folder to have an exact name and use * `importPath "../"`. * - * Hence the final format should be `$BASE/$NAME-$VERSION/$NAME`, - * but this function returns `$BASE/$NAME-$VERSION/` + * Hence the final format returned is `$BASE/$NAME/$VERSION/$NAME`, * `$BASE` is `this.packagePath`. */ NativePath getPackagePath (string name, string vers) { - NativePath result = this.packagePath ~ name ~ vers; + NativePath result = this.packagePath ~ name ~ vers ~ name; result.endsWithSlash = true; return result; } diff --git a/source/dub/test/base.d b/source/dub/test/base.d index 366ac1340..15e1d0667 100644 --- a/source/dub/test/base.d +++ b/source/dub/test/base.d @@ -335,8 +335,6 @@ package class TestPackageManager : PackageManager string gitReference = repo.ref_.chompPrefix("~"); NativePath destination = this.getPackagePath(PlacementLocation.user, name, repo.ref_); - destination ~= name; - destination.endsWithSlash = true; foreach (p; getPackageIterator(name)) if (p.path == destination)