From fb58a375f8ea41ce1c9314db3975a99ee87be896 Mon Sep 17 00:00:00 2001 From: Goffi Date: Fri, 12 Jul 2019 11:29:05 +0200 Subject: [PATCH] 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. --- sat_frontends/jp/cmd_blog.py | 1 + 1 file changed, 1 insertion(+) diff --git a/sat_frontends/jp/cmd_blog.py b/sat_frontends/jp/cmd_blog.py index ee7cbc4c..1cfeb530 100644 --- a/sat_frontends/jp/cmd_blog.py +++ b/sat_frontends/jp/cmd_blog.py @@ -801,6 +801,7 @@ class Preview(base.CommandBase, common.BaseEdit): ), 2, ) + i.remove_watch(self.content_file_path) try: add_watch() except InotifyError: