summaryrefslogtreecommitdiff
path: root/pcr/mediatomb/symlinks.patch
blob: 8028f2201784c93a1484992518099d4941bf32e2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
--- mediatomb-0.12.1.orig/src/autoscan_inotify.cc	2010-03-25 10:58:11.000000000 -0400
+++ mediatomb-0.12.1/src/autoscan_inotify.cc	2012-06-18 02:40:11.000000000 -0400
@@ -281,7 +281,7 @@
                     }
                 }
                 
-                if (adir != nil && mask & (IN_DELETE | IN_DELETE_SELF | IN_MOVE_SELF | IN_CLOSE_WRITE | IN_MOVED_FROM | IN_MOVED_TO | IN_UNMOUNT))
+                if (adir != nil && mask & (IN_DELETE | IN_DELETE_SELF | IN_MOVE_SELF | IN_CLOSE_WRITE | IN_MOVED_FROM | IN_MOVED_TO | IN_UNMOUNT | IN_CREATE))
                 {
                     String fullPath;
                     if (mask & IN_ISDIR)
@@ -312,16 +312,17 @@
                         if (objectID != INVALID_OBJECT_ID)
                             cm->removeObject(objectID);
                     }
-                    if (mask & (IN_CLOSE_WRITE | IN_MOVED_TO))
+                    if (mask & (IN_CLOSE_WRITE | IN_MOVED_TO | IN_CREATE))
                     {
                         log_debug("adding %s\n", path.c_str());
                         // path, recursive, async, hidden, low priority, cancellable
                         cm->addFile(fullPath, adir->getRecursive(), true, adir->getHidden(), true, false);
                         
-                        if (mask & IN_ISDIR)
+                        if (mask & IN_ISDIR && !(mask & IN_CREATE))
                             monitorUnmonitorRecursive(path, false, adir, watchAs->getNormalizedAutoscanPath(), false);
                     }
                 }
+
                 if (mask & IN_IGNORED)
                 {
                     removeWatchMoves(wd);
--- mediatomb-0.12.1.orig/src/content_manager.cc	2010-03-25 10:58:11.000000000 -0400
+++ mediatomb-0.12.1/src/content_manager.cc	2012-06-18 02:03:55.000000000 -0400
@@ -202,7 +202,7 @@
 #ifdef HAVE_MAGIC
     if (! ignore_unknown_extensions)
     {
-        ms = magic_open(MAGIC_MIME);
+        ms = magic_open(MAGIC_MIME|MAGIC_SYMLINK);
         if (ms == NULL)
         {
			 log_error("magic_open failed\n");