summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--xmake/modules/package/manager/cargo/find_package.lua6
1 files changed, 5 insertions, 1 deletions
diff --git a/xmake/modules/package/manager/cargo/find_package.lua b/xmake/modules/package/manager/cargo/find_package.lua
index c6b2cc10f..93576d775 100644
--- a/xmake/modules/package/manager/cargo/find_package.lua
+++ b/xmake/modules/package/manager/cargo/find_package.lua
@@ -29,7 +29,11 @@ import("lib.detect.find_file")
-- get cargo registry directory
function _get_cargo_registrydir()
- return "~/.cargo/registry"
+ if is_host("windows") then
+ return "$(env USERPROFILE)\\.cargo\\registry"
+ else
+ return "~/.cargo/registry"
+ end
end
-- get the Cargo.toml of package