Use special case for indexing empty files
This commit is contained in:
parent
822171bd7e
commit
d0f829fec2
2 changed files with 4 additions and 0 deletions
|
@ -133,6 +133,9 @@ string mimetype(const string &fn, const struct stat *stp,
|
||||||
return "inode/symlink";
|
return "inode/symlink";
|
||||||
if (!S_ISREG(stp->st_mode))
|
if (!S_ISREG(stp->st_mode))
|
||||||
return "inode/x-fsspecial";
|
return "inode/x-fsspecial";
|
||||||
|
// Empty files are just this: avoid further errors with actual filters.
|
||||||
|
if (stp->st_size == 0)
|
||||||
|
return "inode/x-empty";
|
||||||
}
|
}
|
||||||
|
|
||||||
string mtype;
|
string mtype;
|
||||||
|
|
|
@ -133,6 +133,7 @@ image/vnd.djvu = exec rcldjvu
|
||||||
image/svg+xml = exec rclsvg
|
image/svg+xml = exec rclsvg
|
||||||
image/x-xcf = execm rclimg
|
image/x-xcf = execm rclimg
|
||||||
inode/symlink = internal
|
inode/symlink = internal
|
||||||
|
inode/x-empty = exec rclnull
|
||||||
message/rfc822 = internal
|
message/rfc822 = internal
|
||||||
text/calendar = execm rclics;mimetype=text/plain
|
text/calendar = execm rclics;mimetype=text/plain
|
||||||
text/html = internal
|
text/html = internal
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue