Closed
Description
uri.path()
will return /C:/file.txt
on windows and call to vale.exe will fail.
uri.path()
is returning uri component called "path" (not what we want), i think it's better to use uri.to_file_path()
to get file path in correct format.
diff --git a/src/server.rs b/src/server.rs
index c84f874..a3242c0 100644
--- a/src/server.rs
+++ b/src/server.rs
@@ -380,7 +380,7 @@ impl Backend {
self.update(params.clone());
if self.cli.is_installed() {
- match self.cli.run(uri.path(), self.config_path(), self.config_filter()) {
+ match self.cli.run(uri.to_file_path().unwrap().to_str().unwrap(), self.config_path(), self.config_filter()) {
Ok(result) => {
let mut diagnostics = Vec::new();
for (_, v) in result.iter() {