Opened at 2015-05-21T18:00:09Z
Last modified at 2016-03-22T05:02:52Z
#2427 closed defect
Magic Folder on Linux: handle case when directory is removed from monitored directory — at Version 9
Reported by: | dawuud | Owned by: | dawuud |
---|---|---|---|
Priority: | normal | Milestone: | 1.12.0 |
Component: | code-frontend-magic-folder | Version: | 1.10.0 |
Keywords: | test-needed otf-magic-folder-objective4 | Cc: | |
Launchpad Bug: |
Description (last modified by daira)
We need to handle the case where a directory is removed or moved out of the monitored local directory.
Specifically this case needs to be specially handled only when the sub-directory was moved into the drop uploader directory and a inotify watch for that sub-directory was added. Further investigation is needed to determine the proper way to remove this inotify watch.
So far it seems that we will respond to either the IN_DELETE_SELF or IN_MOVE_SELF events for each of these sub-directory inotify "watches".
Change History (9)
comment:1 Changed at 2015-05-23T18:49:33Z by daira
comment:2 Changed at 2015-05-24T14:37:45Z by daira
The constant for IN_EXCL_UNLINK isn't defined by Twisted (https://twistedmatrix.com/trac/ticket/7789) but that's okay, we can define it ourselves, since Twisted passes through unknown flags.
comment:3 Changed at 2015-05-24T16:55:10Z by daira
- Keywords drop-upload unix added
Note that this is not an issue on Windows, because ReadDirectoryChangesW only reads events that occur for paths that are still under the recursively-watched directory.
comment:4 Changed at 2015-05-24T16:55:29Z by daira
- Component changed from unknown to code-frontend-drop-upload
- Milestone changed from undecided to 1.11.0
comment:5 Changed at 2015-05-24T16:56:21Z by daira
- Summary changed from handle case when directory is removed from drop upload directory to drop-upload on Linux: handle case when directory is removed from drop upload directory
comment:6 Changed at 2015-05-26T09:54:26Z by daira
- Keywords test-needed added
- Owner changed from daira to dawuud
comment:7 Changed at 2015-05-26T18:28:03Z by dawuud
Furthermore these additional tests should also demonstrate that a directory which has been moved into the drop upload directory will have the IN_EXCL_UNLINK behavior just like the upload directory itself.
comment:8 Changed at 2015-06-01T16:11:09Z by daira
- Keywords magic-folder added
Add magic-folder keyword to all drop-upload tickets.
comment:9 Changed at 2015-06-01T16:54:54Z by daira
- Description modified (diff)
- Keywords otf-magic-folder-objective4 added; drop-upload unix magic-folder removed
- Summary changed from drop-upload on Linux: handle case when directory is removed from drop upload directory to Magic Folder on Linux: handle case when directory is removed from monitored directory
It seems as though the IN_EXCL_UNLINK flag would help with this: