ProjectController.py
changeset 3380 794e39598e46
parent 3376 83ed4ea362db
child 3395 93ad018fb602
--- 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()