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() {
|
if let Some(path) = favorite.path_opt() {
|
||||||
let name = if matches!(favorite, Favorite::Home) {
|
let name = if matches!(favorite, Favorite::Home) {
|
||||||
fl!("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()) {
|
} else if let Some(file_name) = path.file_name().and_then(|x| x.to_str()) {
|
||||||
file_name.to_string()
|
file_name.to_string()
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
|
|
@ -902,6 +902,8 @@ impl App {
|
||||||
if let Some(path) = favorite.path_opt() {
|
if let Some(path) = favorite.path_opt() {
|
||||||
let name = if matches!(favorite, Favorite::Home) {
|
let name = if matches!(favorite, Favorite::Home) {
|
||||||
fl!("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()) {
|
} else if let Some(file_name) = path.file_name().and_then(|x| x.to_str()) {
|
||||||
file_name.to_string()
|
file_name.to_string()
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue