Use name for network location if available
This commit is contained in:
parent
b3af8bf211
commit
38e4fd3ec7
2 changed files with 4 additions and 0 deletions
|
|
@ -1771,6 +1771,8 @@ impl App {
|
|||
if let Some(path) = favorite.path_opt() {
|
||||
let name = if matches!(favorite, Favorite::Home) {
|
||||
fl!("home")
|
||||
} else if let Favorite::Network { name, .. } = favorite {
|
||||
name.clone()
|
||||
} else if let Some(file_name) = path.file_name().and_then(|x| x.to_str()) {
|
||||
file_name.to_string()
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -902,6 +902,8 @@ impl App {
|
|||
if let Some(path) = favorite.path_opt() {
|
||||
let name = if matches!(favorite, Favorite::Home) {
|
||||
fl!("home")
|
||||
} else if let Favorite::Network { name, .. } = favorite {
|
||||
name.clone()
|
||||
} else if let Some(file_name) = path.file_name().and_then(|x| x.to_str()) {
|
||||
file_name.to_string()
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue