diff --git a/lmn-client.yml b/lmn-client.yml
index b20f60e..b1a5695 100644
--- a/lmn-client.yml
+++ b/lmn-client.yml
@@ -373,6 +373,11 @@
chdir: /tmp/
when: new_kio.changed | default(false)
+ - name: Patch spyder to fix 'file-has-changed' issues on CIFS
+ ansible.posix.patch:
+ src: spyder.patch
+ dest: /usr/lib/python3/dist-packages/spyder/plugins/editor/widgets/editor.py
+
#################
- name: Timestamp successfull run and send up-to-date report
diff --git a/spyder.patch b/spyder.patch
new file mode 100644
index 0000000..39f7c04
--- /dev/null
+++ b/spyder.patch
@@ -0,0 +1,23 @@
+--- /usr/lib/python3/dist-packages/spyder/plugins/editor/widgets/editor.py 2024-06-20 07:16:54.096395325 +0200
++++ /usr/lib/python3/dist-packages/spyder/plugins/editor/widgets/editor.py 2024-06-20 14:39:07.693577124 +0200
+@@ -2370,15 +2370,16 @@
+ else:
+ # Else, testing if it has been modified elsewhere:
+ lastm = QFileInfo(finfo.filename).lastModified()
+- if to_text_string(lastm.toString()) \
+- != to_text_string(finfo.lastmodified.toString()):
++ dt = finfo.lastmodified.msecsTo(lastm)
++ if dt > 1000:
+ if finfo.editor.document().isModified():
+ self.msgbox = QMessageBox(
+ QMessageBox.Question,
+ self.title,
+- _("%s has been modified outside Spyder."
++ _("It looks like %s has been modified "
++ "outside Spyder. The working copy is from %i milliseconds ago."
+ "
Do you want to reload it and lose all "
+- "your changes?") % name,
++ "your changes?") % (name, dt),
+ QMessageBox.Yes | QMessageBox.No,
+ self)
+ answer = self.msgbox.exec_()