Skip to content

Commit

Permalink
fix(macros): use resolve_path when getting path for include_str!() (
Browse files Browse the repository at this point in the history
#1392)

fixes #1387
  • Loading branch information
abonander authored Aug 20, 2021
1 parent 207e6db commit c04f83b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sqlx-macros/src/query/input.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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))?;

Expand Down

0 comments on commit c04f83b

Please sign in to comment.