Ticket #263 (new defect)

Opened 2 years ago

Last modified 2 years ago

inotifiy and FSStore roots that are symlinks

Reported by: myers Assigned to: dev
Priority: major Milestone:
Component: MediaServer Backend FileSystem Version:
Keywords: patch_included Cc:

Description

On my system I put the files I want to serve via coherence in a symlinked directory. That works great, except when a file is deleted it's not delisted. Inotify is returning a "realpath" with all the symlinks deref'ed. This patch for 0.6.4 fixes it.

Index: coherence/backends/fs_storage.py
===================================================================
--- coherence/backends/fs_storage.py    (revision 1284)
+++ coherence/backends/fs_storage.py    (working copy)
@@ -519,8 +519,10 @@
             for child in parent.children:
                 #if not isinstance(name, unicode):
                 #    name = name.decode("utf8")
+                child_realpath = os.path.realpath(child.location.path)
                 self.debug("%r %r %r" % (child.get_name(),child.get_realpath(), name == child.get_realpath()))
-                if name == child.get_realpath():
+                if name == child_realpath:
+                    self.debug('get_id_by_name found: child.id %r' % (child.id,))
                     return child.id
         except:
             import traceback

Change History

06.11.2009 18:54:16 changed by myers

  • keywords set to patch_included.