Skip to content

Commit 9b2f3e0

Browse files
committed
cleanup
1 parent b4cbc7e commit 9b2f3e0

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/fs_service.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -62,11 +62,11 @@ impl FileSystemService {
6262
let expanded_path = expand_home(requested_path.to_path_buf());
6363

6464
// 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));
65+
let absolute_path = if expanded_path.as_path().is_absolute() {
66+
expanded_path.clone()
67+
} else {
68+
env::current_dir().unwrap().join(&expanded_path)
69+
};
7070

7171
// Normalize the path
7272
let normalized_requested = normalize_path(&absolute_path);

0 commit comments

Comments
 (0)