Skip to content

Commit e402d4b

Browse files
Add default name as Project.vc3
1 parent 865d8f6 commit e402d4b

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

backend/synthesis/synthesis.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -145,10 +145,13 @@ def synthesize(data: dict) -> Tuple[str, BytesIO]:
145145
zipfile, optional_files = syntheize_modules(data, zipfile)
146146
zipfile = synthesize_executioner(zipfile, optional_files)
147147
zipfile = syntesize_extras(zipfile)
148-
# Add the .vc3 file to the built application, this will let us easily load the project in Visual Circuit
149-
zipfile.append(data['package']['name'] + PROJECT_FILE_EXTENSION, json.dumps(data))
150148

151149
# Project name (zipfile name)
152-
project_name = f"{data['package']['name']}.zip" if data['package']['name'] != '' else 'Project.zip'
150+
project_name = f"{data['package']['name']}" if data['package']['name'] != '' else 'Project'
151+
152+
# Add the .vc3 file to the built application, this will let us easily load the project in Visual Circuit
153+
zipfile.append(project_name + PROJECT_FILE_EXTENSION, json.dumps(data))
154+
# .zip is required for the name of the full package
155+
project_name += '.zip'
153156

154157
return project_name, zipfile.get_zip()

0 commit comments

Comments
 (0)