Skip to content

Commit 77f4b3e

Browse files
committed
fix: remove duplicate fallback block in package_fetcher
1 parent e04bca7 commit 77f4b3e

1 file changed

Lines changed: 0 additions & 22 deletions

File tree

src/pm/package_fetcher.cppm

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -627,28 +627,6 @@ Fetcher::resolve_xpkg_path(std::string_view target,
627627
}
628628
}
629629
}
630-
if (!std::filesystem::exists(verdir)) {
631-
// xlings may have installed the package into its own global home
632-
// rather than the mcpp sandbox. Try to copy it from the global
633-
// xlings data directory.
634-
auto xlings_home_env = std::getenv("HOME");
635-
#if defined(_WIN32)
636-
if (!xlings_home_env) xlings_home_env = std::getenv("USERPROFILE");
637-
#endif
638-
if (xlings_home_env) {
639-
auto globalXpkgs = std::filesystem::path(xlings_home_env)
640-
/ ".xlings" / "data" / "xpkgs"
641-
/ verdir.parent_path().filename()
642-
/ verdir.filename();
643-
std::error_code ec;
644-
if (std::filesystem::exists(globalXpkgs, ec)) {
645-
std::filesystem::create_directories(verdir.parent_path(), ec);
646-
std::filesystem::copy(globalXpkgs, verdir,
647-
std::filesystem::copy_options::recursive
648-
| std::filesystem::copy_options::overwrite_existing, ec);
649-
}
650-
}
651-
}
652630
if (!std::filesystem::exists(verdir)) {
653631
return std::unexpected(CallError{
654632
std::format("xpkg payload missing: {}", verdir.string())});

0 commit comments

Comments
 (0)