Use special case for indexing empty files
This commit is contained in:
parent
e825286037
commit
d10b557e4c
@ -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…
x
Reference in New Issue
Block a user