]> git.ipfire.org Git - thirdparty/tvheadend.git/commit
dvr: Handle symlinks for inotify. (#4702)
authorE.Smith <31170571+azlm8t@users.noreply.github.com>
Fri, 13 Oct 2017 00:02:52 +0000 (01:02 +0100)
committerJaroslav Kysela <perex@perex.cz>
Wed, 8 Nov 2017 16:52:22 +0000 (17:52 +0100)
commit9aceefa95e5a2d577337078b6085248f3e059546
tree38e38368030c5d7c73cbea945f6bd503fe072135
parent69996aa3af49dc97152eeaa73eac5efcb6de7404
dvr: Handle symlinks for inotify. (#4702)

The filenames stored in the dvr/log are not realpath but can
be based on symlinks.

So, we might record in to /media/Videos/user1/show1 but
user1 could be a symlink to /media/Videos-drive2 (rather than
a bind mount).

Since inotify returns realpaths, if means that when we attempt
to update the dvr/log the filenames do not match.

So we now monitor the realpath for the directories and convert
filenames to realpath when doing the compare.

We do not store realpath in the dvr/log since users do not
want symlinks replaced with real paths.

Issue: #4702.
src/dvr/dvr_inotify.c