Make libmagic follow symlinks.
authorFredrik Tolf <fredrik@dolda2000.com>
Sun, 29 Aug 2010 14:45:06 +0000 (16:45 +0200)
committerFredrik Tolf <fredrik@dolda2000.com>
Sun, 29 Aug 2010 14:45:06 +0000 (16:45 +0200)
I could think this should be the default... :)

src/sendfile.c

index fbf5f1b..b3797aa 100644 (file)
@@ -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)