summaryrefslogtreecommitdiffstats
path: root/src/modes/display/preview.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/modes/display/preview.rs')
-rw-r--r--src/modes/display/preview.rs7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/modes/display/preview.rs b/src/modes/display/preview.rs
index 75f89bd..4332cc0 100644
--- a/src/modes/display/preview.rs
+++ b/src/modes/display/preview.rs
@@ -791,10 +791,15 @@ pub struct Ueberzug {
impl Ueberzug {
fn thumbnail(original: PathBuf, kind: UeberzugKind) -> Self {
+ let filename = original
+ .file_name()
+ .unwrap_or_default()
+ .to_string_lossy()
+ .to_string();
Self {
original,
path: THUMBNAIL_PATH.to_owned(),
- filename: "thumbnail".to_owned(),
+ filename,
kind,
ueberzug: ueberzug::Ueberzug::new(),
length: 0,