fix(#7): cannot found XDG_SESSION_TYPE

This commit is contained in:
Salem Yaslem 2021-05-20 12:41:55 +03:00
parent f573b217db
commit f4a8461ac7

View File

@ -463,10 +463,10 @@ impl Ffmpeg {
fn is_wayland() -> bool {
std::env::var("XDG_SESSION_TYPE")
.unwrap()
.unwrap_or_default()
.eq_ignore_ascii_case("wayland")
}
fn is_snap() -> bool {
std::env::var("SNAP").unwrap_or(String::new()).len() > 0
std::env::var("SNAP").unwrap_or_default().len() > 0
}