mirror of
https://github.com/veeso/termscp.git
synced 2025-12-07 09:36:00 -08:00
Optimized code for fsentry
This commit is contained in:
@@ -474,10 +474,7 @@ impl FileTransferActivity {
|
||||
match &dir.symlink {
|
||||
Some(symlink) => {
|
||||
// Get symlink path
|
||||
let symlink_path: &Path = match &**symlink {
|
||||
FsEntry::Directory(s_dir) => s_dir.abs_path.as_path(),
|
||||
FsEntry::File(s_file) => s_file.abs_path.as_path(),
|
||||
};
|
||||
let symlink_path: PathBuf = symlink.get_abs_path();
|
||||
format!(
|
||||
"{} => {}",
|
||||
dir.abs_path.display(),
|
||||
@@ -570,10 +567,7 @@ impl FileTransferActivity {
|
||||
match &file.symlink {
|
||||
Some(symlink) => {
|
||||
// Get symlink path
|
||||
let symlink_path: &Path = match &**symlink {
|
||||
FsEntry::Directory(s_dir) => s_dir.abs_path.as_path(),
|
||||
FsEntry::File(s_file) => s_file.abs_path.as_path(),
|
||||
};
|
||||
let symlink_path: PathBuf = symlink.get_abs_path();
|
||||
format!(
|
||||
"{} => {}",
|
||||
file.abs_path.display(),
|
||||
|
||||
Reference in New Issue
Block a user