[1.8.x] Refs #23882 -- Added detection for moved files when using inotify polling
Commit15f82c7
("used pyinotify as change detection system when available") introduced a regression where editing a file in vim with default settings (writebackup=auto) no longer causes the dev server to be restarted. On a write, vim moves the monitored file to a backup path and then creates a new file in the original. The new file is not monitored as it has a different inode. Fixed this by also watching for inotify events IN_DELETE_SELF and IN_MOVE_SELF. Backport ofe5cfa394d7
from master
This commit is contained in:
parent
6840aaf3c1
commit
b252e0f350
|
@ -178,7 +178,9 @@ def inotify_code_changed():
|
|||
pyinotify.IN_ATTRIB |
|
||||
pyinotify.IN_MOVED_FROM |
|
||||
pyinotify.IN_MOVED_TO |
|
||||
pyinotify.IN_CREATE
|
||||
pyinotify.IN_CREATE |
|
||||
pyinotify.IN_DELETE_SELF |
|
||||
pyinotify.IN_MOVE_SELF
|
||||
)
|
||||
for path in gen_filenames(only_new=True):
|
||||
wm.add_watch(path, mask)
|
||||
|
|
|
@ -95,3 +95,5 @@ Bugfixes
|
|||
|
||||
* Fixed a regression in ``URLValidator`` that invalidated Punycode TLDs
|
||||
(:ticket:`25059`).
|
||||
|
||||
* Improved `pyinotify` ``runserver`` polling (:ticket:`23882`).
|
||||
|
|
Loading…
Reference in New Issue