changeset 3000:d603550d5e99

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.
author Goffi <goffi@goffi.org>
date Fri, 12 Jul 2019 11:29:05 +0200
parents 85d8e9a7284b
children ce52ac2fe213
files sat_frontends/jp/cmd_blog.py
diffstat 1 files changed, 1 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/sat_frontends/jp/cmd_blog.py	Fri Jul 12 11:24:22 2019 +0200
+++ b/sat_frontends/jp/cmd_blog.py	Fri Jul 12 11:29:05 2019 +0200
@@ -801,6 +801,7 @@
                                 ),
                                 2,
                             )
+                            i.remove_watch(self.content_file_path)
                             try:
                                 add_watch()
                             except InotifyError: