# HG changeset patch # User Goffi # Date 1562923745 -7200 # Node ID d603550d5e99cc8e6d3c87d6d661215a55873634 # Parent 85d8e9a7284b8311db1e39fb1beff37879769366 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. diff -r 85d8e9a7284b -r d603550d5e99 sat_frontends/jp/cmd_blog.py --- 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: