Skip to content

Commit

Permalink
Fix broken tests
Browse files Browse the repository at this point in the history
  • Loading branch information
pfoerster committed Feb 26, 2020
1 parent 4c57289 commit 71f4a02
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions crates/texlab_protocol/src/options.rs
Original file line number Diff line number Diff line change
Expand Up @@ -103,10 +103,16 @@ impl Options {
.and_then(|path| dunce::canonicalize(path).ok())
})
.or_else(|| {
tex_path
.parent()
.map(|path| path.join(&name))
.and_then(|path| dunce::canonicalize(path).ok())
self.latex
.as_ref()
.and_then(|latex| latex.build.as_ref())
.and_then(|build| build.output_directory.as_ref())
.and_then(|path| {
tex_path
.parent()
.map(|parent| parent.join(path).join(&name))
})
})
.or_else(|| tex_path.parent().map(|path| path.join(&name)))
}
}

0 comments on commit 71f4a02

Please sign in to comment.