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 b4cbc7e commit 9b2f3e0Copy full SHA for 9b2f3e0
src/fs_service.rs
@@ -62,11 +62,11 @@ impl FileSystemService {
62
let expanded_path = expand_home(requested_path.to_path_buf());
63
64
// Resolve the absolute path
65
- let absolute_path = expanded_path
66
- .as_path()
67
- .is_absolute()
68
- .then(|| expanded_path.clone())
69
- .unwrap_or_else(|| env::current_dir().unwrap().join(&expanded_path));
+ let absolute_path = if expanded_path.as_path().is_absolute() {
+ expanded_path.clone()
+ } else {
+ env::current_dir().unwrap().join(&expanded_path)
+ };
70
71
// Normalize the path
72
let normalized_requested = normalize_path(&absolute_path);
0 commit comments