diff options
author | cinap_lenrek <cinap_lenrek@felloff.net> | 2021-04-03 19:32:47 +0200 |
---|---|---|
committer | cinap_lenrek <cinap_lenrek@felloff.net> | 2021-04-03 19:32:47 +0200 |
commit | d41c867696019e4408431230d8fae0dcf7603dc4 (patch) | |
tree | e47f555686f076871ffaf71d1c74d18459866b82 | |
parent | 958b4764994eb874ef0382f86f6dfe6ee5db2cf9 (diff) | |
download | plan9front-d41c867696019e4408431230d8fae0dcf7603dc4.tar.xz |
file: detect webp files (thanks kemal)
this patch adds a small check to the "iff" function, so this
way file can detect webp files. tested with a webp file i
found randomly.
-rw-r--r-- | sys/src/cmd/file.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/src/cmd/file.c b/sys/src/cmd/file.c index 2e53dbee8..ba34eb009 100644 --- a/sys/src/cmd/file.c +++ b/sys/src/cmd/file.c @@ -962,6 +962,8 @@ iff(void) print("%s\n", mime? "audio/wave": "wave audio"); else if (strncmp((char*)buf+8, "AVI ", 4) == 0) print("%s\n", mime? "video/avi": "avi video"); + else if (strncmp((char*)buf+8, "WEBP", 4) == 0) + print("%s\n", mime? "image/webp": "webp image"); else print("%s\n", mime? OCTET : "riff file"); return 1; |