fix(macros): use resolve_path when getting path for include_str!() (#1392)

fixes #1387
This commit is contained in:
Austin Bonander 2021-08-20 15:46:32 -07:00 committed by GitHub
parent 207e6db2ce
commit c04f83bcfe
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -120,7 +120,7 @@ impl QuerySrc {
fn file_path(&self, source_span: Span) -> syn::Result<Option<String>> {
if let QuerySrc::File(ref file) = *self {
let path = std::path::Path::new(file)
let path = crate::common::resolve_path(file, source_span)?
.canonicalize()
.map_err(|e| syn::Error::new(source_span, e))?;