diff --git a/source/dub/commandline.d b/source/dub/commandline.d index dd959e3..372d52c 100644 --- a/source/dub/commandline.d +++ b/source/dub/commandline.d @@ -859,7 +859,7 @@ { string package_name; enforceUsage(free_args.length <= 1, "Expected one or zero arguments."); - if (free_args.length >= 1) package_name = free_args[1]; + if (free_args.length >= 1) package_name = free_args[0]; setupPackage(dub, package_name); diff --git a/source/dub/package_.d b/source/dub/package_.d index deac7d2..dfc225b 100644 --- a/source/dub/package_.d +++ b/source/dub/package_.d @@ -698,7 +698,8 @@ foreach (spath; paths) { enforce(!spath.empty, "Paths must not be empty strings."); - auto path = base_path ~ spath; + auto path = Path(spath); + if (!path.absolute) path = base_path ~ path; if (!existsFile(path) || !isDir(path.toNativeString())) { logWarn("Invalid source/import path: %s", path.toNativeString()); continue;