No default image.
[bertos.git] / wizard / bertos_utils.py
index 1aeaef7a78c0c29bb74fae1095a735b90b532141..f10d7dc59fafc11de78f98398a20763a83fed4d6 100644 (file)
@@ -115,6 +115,9 @@ def projectFileGenerator(project_info):
         # For presets save again the BERTOS_PATH into project file
         project_data["PRESET"] = True
         project_data["BERTOS_PATH"] = relpath.relpath(project_info.info("BERTOS_PATH"), directory)
+    elif project_info.edit:
+        # If in editing mode the BERTOS_PATH is maintained
+        project_data["BERTOS_PATH"] = relpath.relpath(project_info.info("BERTOS_PATH"), directory)
     else:
         # Use the local BeRTOS version instead of the original one
         # project_data["BERTOS_PATH"] = project_info.info("BERTOS_PATH")
@@ -294,7 +297,7 @@ def findModuleFiles(module, project_info):
     # TODO: split me in a method/function
     try:
         version_string = bertosVersion(project_info.info("BERTOS_PATH"))
-        version_list = [int(i) for i in version_string.split()[-1].split('.')]
+        version_list = [int(i) for i in version_string.split()[1].split('.')]
     except ValueError:
         # If the version file hasn't a valid version number assume it's an older
         # project.