Project

General

Profile

Bug #4702

dvr: inotify should use to_wd for moving files between watched directories

Added by Em Smith about 4 years ago. Updated about 4 years ago.

Status:
Fixed
Priority:
Normal
Assignee:
Category:
PVR / DVR
Target version:
-
Start date:
2017-11-03
Due date:
% Done:

100%

Estimated time:
Found in version:
4.3
Affected Versions:

Description

Currently the inotify rename correctly updates the dvr/log if the filename is in the same directory. However, if the file is moved to a different watched directory then we currently use from_wd instead of to_wd. This means the directory component isn't updated.

Associated revisions

Revision 69996aa3 (diff)
Added by Em Smith about 4 years ago

dvr: Handle inotify moving file to different directory. (#4702)

Previously if we moved a file from one directory we are
monitoring to another directory we are monitoring then the
path would not be updated correctly since we did not lookup
the 'to_fd'.

Issue: #4702.

Revision 9aceefa9 (diff)
Added by Em Smith about 4 years ago

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.

Revision d96f3ac8 (diff)
Added by Em Smith about 4 years ago

dvr: Move declarations to top of function. (#4702)

Issue: #4702.

Revision 10bdd7f4 (diff)
Added by Jaroslav Kysela about 4 years ago

dvr inotify: reuse variables, fixes #4702

Revision dd157645 (diff)
Added by Jaroslav Kysela about 4 years ago

dvr inotify: fix my last change, fixes #4702

Revision 55af4e3f (diff)
Added by Em Smith over 3 years ago

dvr: Handle inotify moving file to different directory. (#4702)

Previously if we moved a file from one directory we are
monitoring to another directory we are monitoring then the
path would not be updated correctly since we did not lookup
the 'to_fd'.

Issue: #4702.

Revision 76a274c9 (diff)
Added by Em Smith over 3 years ago

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.

Revision a71788a6 (diff)
Added by Em Smith over 3 years ago

dvr: Move declarations to top of function. (#4702)

Issue: #4702.

Revision f45df564 (diff)
Added by Jaroslav Kysela over 3 years ago

dvr inotify: reuse variables, fixes #4702

Revision ed179427 (diff)
Added by Jaroslav Kysela over 3 years ago

dvr inotify: fix my last change, fixes #4702

History

#1

Updated by Jaroslav Kysela about 4 years ago

  • Status changed from New to Fixed
  • % Done changed from 0 to 100

Also available in: Atom PDF