Store absolute path on server when sharing worktree

Co-Authored-By: Antonio Scandurra <me@as-cii.com>
This commit is contained in:
Nathan Sobo
2022-11-10 09:34:16 -07:00
co-authored by Antonio Scandurra
parent 8e70e1934a
commit fb03eb7a3c
4 changed files with 27 additions and 10 deletions
+3 -3
View File
@@ -42,7 +42,6 @@ use std::{
marker::PhantomData,
net::SocketAddr,
ops::{Deref, DerefMut},
os::unix::prelude::OsStrExt,
rc::Rc,
sync::{
atomic::{AtomicBool, Ordering::SeqCst},
@@ -1024,7 +1023,7 @@ impl Server {
id: *id,
root_name: worktree.root_name.clone(),
visible: worktree.visible,
abs_path: worktree.abs_path.as_os_str().as_bytes().to_vec(),
abs_path: worktree.abs_path.clone(),
})
.collect::<Vec<_>>();
@@ -1075,7 +1074,7 @@ impl Server {
let message = proto::UpdateWorktree {
project_id: project_id.to_proto(),
worktree_id: *worktree_id,
abs_path: worktree.abs_path.as_os_str().as_bytes().to_vec(),
abs_path: worktree.abs_path.clone(),
root_name: worktree.root_name.clone(),
updated_entries: worktree.entries.values().cloned().collect(),
removed_entries: Default::default(),
@@ -1195,6 +1194,7 @@ impl Server {
project_id,
worktree_id,
&request.payload.root_name,
&request.payload.abs_path,
&request.payload.removed_entries,
&request.payload.updated_entries,
request.payload.scan_id,