From 5c591d5b97e60493c1945376619cd2d2c24471c6 Mon Sep 17 00:00:00 2001 From: Fredrik Tolf Date: Sun, 29 Aug 2010 16:45:06 +0200 Subject: [PATCH] Make libmagic follow symlinks. I could think this should be the default... :) --- src/sendfile.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sendfile.c b/src/sendfile.c index fbf5f1b..b3797aa 100644 --- a/src/sendfile.c +++ b/src/sendfile.c @@ -102,7 +102,7 @@ static const char *getmimetype(char *file, struct stat *sb) if((ret = attrmimetype(file)) != NULL) return(ret); if(cookie == NULL) { - cookie = magic_open(MAGIC_MIME_TYPE); + cookie = magic_open(MAGIC_MIME_TYPE | MAGIC_SYMLINK); magic_load(cookie, NULL); } if((ret = magic_file(cookie, file)) != NULL) -- 2.11.0