Follow-up on 83ed4ea362db 'IDE: prevent invoking matiec when IEC code did not change since last build' : build unconditionally after clean
authorEdouard Tisserant <edouard.tisserant@gmail.com>
Tue, 02 Nov 2021 08:36:06 +0100
changeset 3380 794e39598e46
parent 3378 e655ec8162e1
child 3382 589abe084e57
Follow-up on 83ed4ea362db 'IDE: prevent invoking matiec when IEC code did not change since last build' : build unconditionally after clean
ProjectController.py
--- a/ProjectController.py	Fri Oct 29 18:07:28 2021 +0200
+++ b/ProjectController.py	Tue Nov 02 08:36:06 2021 +0100
@@ -797,7 +797,12 @@
 
         IECCodeContent += open(self._getIECgeneratedcodepath(), "r").read()
 
-        with open(self._getIECcodepath(), "w") as plc_file:
+        IECcodepath = self._getIECcodepath()
+
+        if not os.path.exists(IECcodepath):
+            self.LastBuiltIECcodeDigest = None
+
+        with open(IECcodepath, "w") as plc_file:
             plc_file.write(IECCodeContent)
 
         hasher = hashlib.md5()