Links: resolve stored paths with craft-docpath's resolve_absolute (#3267)

* Links: use resolve_absolute for stored paths

* CI: release only with git dependencies from storytold

* Release: check git sources from the parsed Cargo.lock and cargo config

The grep let any character stand for the dot in github.com, passed a missing or stale
Cargo.lock, and missed source replacement in .cargo/config.
This commit is contained in:
aiongg
2026-10-23 17:51:28 -04:00
committed by GitHub
parent f02eedd50d
commit 6877d6535f
3 changed files with 42 additions and 5 deletions
+1 -4
View File
@@ -1184,7 +1184,7 @@ pub(crate) fn document_path_with(
) -> std::result::Result<String, craft_docpath::Refused> {
use craft_docpath::Refused;
let document = document.map(absolute_path);
let resolve = |document: Option<&str>| craft_docpath::resolve(stored, document.map(std::path::Path::new));
let resolve = |document: Option<&str>| craft_docpath::resolve_absolute(stored, document.map(std::path::Path::new));
let path = match resolve(document.as_deref()) {
Err(Refused::Network) => {
let share = document.as_deref().and_then(share).ok_or(Refused::Network)?;
@@ -1192,9 +1192,6 @@ pub(crate) fn document_path_with(
}
path => path?,
};
if !path.is_absolute() {
return Err(Refused::Invalid);
}
path.into_os_string().into_string().map_err(|_| Refused::Invalid)
}