1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
|
Description: Follow symlinks when determining MIME type
This is the last remenants of the original symlinks patch to correctly handle
adding symlinks to a directory using inotify. All the inotify code has already
been applied upstream.
.
This last part fixes the MIME detection for symlinks by enabling MAGIC_SYMLINK
when magic_open is called.
Author: Jona Schuman <jonaschuman@gmail.com>
Bug-Debian: https://bugs.debian.org/677964
Forwarded: no
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- a/src/content_manager.cc
+++ b/src/content_manager.cc
@@ -181,7 +181,7 @@ ContentManager::ContentManager()
/* init filemagic */
#ifdef HAVE_MAGIC
if (!ignore_unknown_extensions) {
- ms = magic_open(MAGIC_MIME);
+ ms = magic_open(MAGIC_MIME|MAGIC_SYMLINK);
if (ms == nullptr) {
log_error("magic_open failed\n");
} else {
|