Skip to content

Commit 58c957b

Browse files
committed
Further attempt to reduce issues regarding cwd
1 parent 6d4e58c commit 58c957b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/editor/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -380,7 +380,7 @@ impl Editor {
380380
/// Updates the current working directory of the editor
381381
pub fn update_cwd(&self) {
382382
if let Some(doc) = self.try_doc() {
383-
if let Some(name) = get_absolute_path(&doc.file_name.clone().unwrap_or_default()) {
383+
if let Some(name) = &doc.file_name {
384384
let file = Path::new(&name);
385385
if let Some(cwd) = file.parent() {
386386
let _ = env::set_current_dir(cwd);

0 commit comments

Comments
 (0)