From: Fredrik Tolf Date: Sun, 29 Aug 2010 14:45:06 +0000 (+0200) Subject: Make libmagic follow symlinks. X-Git-Tag: 0.1~63 X-Git-Url: http://dolda2000.com/gitweb/?p=ashd.git;a=commitdiff_plain;h=5c591d5b97e60493c1945376619cd2d2c24471c6 Make libmagic follow symlinks. I could think this should be the default... :) --- 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)