#2836 closed defect (somebody else's problem)

magic-folder: watched sub-dir watched after being removed from magic-folder

Reported by: dawuud Owned by: daira
Priority: normal Milestone: undecided
Component: code-frontend-magic-folder Version: 1.11.0
Keywords: magic-folder Cc:
Launchpad Bug:

Description

inotify is used in non-recursive mode on the magic-folder however additional directories which are added are done so in recursive mode. why this inconsistency? i think we should always use recursive mode!

however even after applying recursive inotify everywhere we still must remove directories from our watch when they are moved out of the magic-folder.

Change History (6)

comment:1 Changed at 2016-10-06T14:40:42Z by dawuud

if we added another field in our magic-folder database schema... file object type... then we could use it to distinguish files versus directories... and thereby detect removed directories and perform a subsequent inotify.ignore to remove our watch of that directory.

what do you think?

comment:2 Changed at 2016-10-13T14:54:56Z by dawuud

  • Summary changed from magic-folder: watched sub-dir stilled watched after being removed from magic-folder to magic-folder: watched sub-dir watched after being removed from magic-folder

comment:3 Changed at 2016-10-13T15:05:01Z by dawuud

my attempt to inotify.ignore sub-dirs that are moved out of the magic-folder: https://github.com/david415/tahoe-lafs/tree/2836.not_watch_moved_dir.1

comment:4 Changed at 2016-10-13T15:11:05Z by daira

  • Component changed from unknown to code-frontend-magic-folder
  • Owner set to daira

comment:5 Changed at 2016-10-14T10:10:47Z by dawuud

another dev branch: https://github.com/david415/tahoe-lafs/tree/2836.not_watch_moved_dir.2

added a test_move_tree_out... however this test passes even without the additional call to self._notifier.ignore; perhaps inotify is ignoring directories moved out of the watched directory? already?

comment:6 Changed at 2020-06-30T13:47:37Z by exarkun

  • Resolution set to somebody else's problem
  • Status changed from new to closed

magic-folder has been split out into a separate project - https://github.com/leastauthority/magic-folder

Note: See TracTickets for help on using tickets.