Show project panel symlink icons for remote clients (#19464)
This commit is contained in:
parent
e8207288e5
commit
1ae30f5813
10 changed files with 31 additions and 36 deletions
|
@ -3203,7 +3203,6 @@ pub struct Entry {
|
|||
pub mtime: Option<SystemTime>,
|
||||
|
||||
pub canonical_path: Option<Box<Path>>,
|
||||
pub is_symlink: bool,
|
||||
/// Whether this entry is ignored by Git.
|
||||
///
|
||||
/// We only scan ignored entries once the directory is expanded and
|
||||
|
@ -3280,7 +3279,6 @@ impl Entry {
|
|||
mtime: Some(metadata.mtime),
|
||||
size: metadata.len,
|
||||
canonical_path,
|
||||
is_symlink: metadata.is_symlink,
|
||||
is_ignored: false,
|
||||
is_external: false,
|
||||
is_private: false,
|
||||
|
@ -5249,12 +5247,15 @@ impl<'a> From<&'a Entry> for proto::Entry {
|
|||
path: entry.path.to_string_lossy().into(),
|
||||
inode: entry.inode,
|
||||
mtime: entry.mtime.map(|time| time.into()),
|
||||
is_symlink: entry.is_symlink,
|
||||
is_ignored: entry.is_ignored,
|
||||
is_external: entry.is_external,
|
||||
git_status: entry.git_status.map(git_status_to_proto),
|
||||
is_fifo: entry.is_fifo,
|
||||
size: Some(entry.size),
|
||||
canonical_path: entry
|
||||
.canonical_path
|
||||
.as_ref()
|
||||
.map(|path| path.to_string_lossy().to_string()),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -5277,12 +5278,13 @@ impl<'a> TryFrom<(&'a CharBag, proto::Entry)> for Entry {
|
|||
inode: entry.inode,
|
||||
mtime: entry.mtime.map(|time| time.into()),
|
||||
size: entry.size.unwrap_or(0),
|
||||
canonical_path: None,
|
||||
canonical_path: entry
|
||||
.canonical_path
|
||||
.map(|path_string| Box::from(Path::new(&path_string))),
|
||||
is_ignored: entry.is_ignored,
|
||||
is_external: entry.is_external,
|
||||
git_status: git_status_from_proto(entry.git_status),
|
||||
is_private: false,
|
||||
is_symlink: entry.is_symlink,
|
||||
char_bag,
|
||||
is_fifo: entry.is_fifo,
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue