From c04f83bcfe0bf82a93a63efb58a78db0d1e18379 Mon Sep 17 00:00:00 2001 From: Austin Bonander Date: Fri, 20 Aug 2021 15:46:32 -0700 Subject: [PATCH] fix(macros): use `resolve_path` when getting path for `include_str!()` (#1392) fixes #1387 --- sqlx-macros/src/query/input.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sqlx-macros/src/query/input.rs b/sqlx-macros/src/query/input.rs index ecfc3e64..f3bce4a3 100644 --- a/sqlx-macros/src/query/input.rs +++ b/sqlx-macros/src/query/input.rs @@ -120,7 +120,7 @@ impl QuerySrc { fn file_path(&self, source_span: Span) -> syn::Result> { 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))?;