We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7ef503d commit 2dacbb0Copy full SHA for 2dacbb0
crates/djls-server/src/workspace.rs
@@ -29,12 +29,13 @@ fn uri_to_pathbuf(uri: &Uri) -> Option<PathBuf> {
29
30
// Decode the percent-encoded path string
31
let decoded_path_cow = percent_decode_str(encoded_path_str).decode_utf8_lossy();
32
-
33
- #[cfg(unix)]
34
let path_str = decoded_path_cow.as_ref();
+
35
#[cfg(windows)]
36
- // Remove leading '/' for paths like /C:/...
37
- let path_str = path_str.strip_prefix('/').unwrap_or(path_str);
+ let path_str = {
+ // Remove leading '/' for paths like /C:/...
+ path_str.strip_prefix('/').unwrap_or(path_str)
38
+ };
39
40
Some(PathBuf::from(path_str))
41
}
0 commit comments