jp (blog/preview): fixed watch restoring when file is moved/deleted:
with some editors (e.g. vim), when file is written it is actually replaced with a buffered one. In this case, jp replace the watch to check the new file, but it was not working anymore with latest version of inotify module. This patch fixes it by removing the old watch before adding a new one.
This commit is contained in:
parent
b9bf53a23c
commit
fb58a375f8
1 changed files with 1 additions and 0 deletions
|
|
@ -801,6 +801,7 @@ class Preview(base.CommandBase, common.BaseEdit):
|
|||
),
|
||||
2,
|
||||
)
|
||||
i.remove_watch(self.content_file_path)
|
||||
try:
|
||||
add_watch()
|
||||
except InotifyError:
|
||||
|
|
|
|||
Loading…
Reference in a new issue