Fix BeRTOS version related bug.
authorduplo <duplo@38d2e660-2303-0410-9eaa-f027e97ec537>
Mon, 3 May 2010 14:25:52 +0000 (14:25 +0000)
committerduplo <duplo@38d2e660-2303-0410-9eaa-f027e97ec537>
Mon, 3 May 2010 14:25:52 +0000 (14:25 +0000)
git-svn-id: https://src.develer.com/svnoss/bertos/trunk@3597 38d2e660-2303-0410-9eaa-f027e97ec537

wizard/BProject.py

index f001e725b30741badcedb83c462b4b0aa763f2e8..76f62217d647ca5a47d979114262b076bdbbe6d2 100644 (file)
@@ -401,8 +401,9 @@ class BProject(object):
         self.infos["RELEVANT_FILES"] = relevants_files
 
     def _writeVersionFile(self, filename):
-        version_file = open(os.path.join(const.DATA_DIR, "vtemplates/VERSION"), "r").read()
-        open(filename, "w").write(versionFileGenerator(self, version_file))
+        if not self.edit or self.old_srcdir:
+            version_file = open(os.path.join(const.DATA_DIR, "vtemplates/VERSION"), "r").read()
+            open(filename, "w").write(versionFileGenerator(self, version_file))
 
     def _writeProjectFile(self, filename):
         f = open(filename, "w")