fix: do not use application/x-zerosize as mime type for empty files
This commit is contained in:
parent
48eef3906d
commit
64998b37a1
1 changed files with 1 additions and 0 deletions
|
|
@ -78,6 +78,7 @@ pub fn mime_for_path(
|
||||||
let mime_icon_cache = MIME_ICON_CACHE.lock().unwrap();
|
let mime_icon_cache = MIME_ICON_CACHE.lock().unwrap();
|
||||||
// Try the shared mime info cache first
|
// Try the shared mime info cache first
|
||||||
let mut gb = mime_icon_cache.shared_mime_info.guess_mime_type();
|
let mut gb = mime_icon_cache.shared_mime_info.guess_mime_type();
|
||||||
|
gb.zero_size(false);
|
||||||
if remote {
|
if remote {
|
||||||
if let Some(file_name) = path.file_name().and_then(std::ffi::OsStr::to_str) {
|
if let Some(file_name) = path.file_name().and_then(std::ffi::OsStr::to_str) {
|
||||||
gb.file_name(file_name);
|
gb.file_name(file_name);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue