Add project name as root for zip file
This commit is contained in:
parent
cd628f48b7
commit
0d47b51f3f
@ -9,11 +9,12 @@ class ProjectZip(private val templates: List<Template>) {
|
||||
fun createZip(project: Project): String {
|
||||
val name: String
|
||||
|
||||
ZipOutput(sanitizeFilename(project.name)).use { zip ->
|
||||
val projectName = sanitizeFilename(project.name)
|
||||
ZipOutput(projectName).use { zip ->
|
||||
name = zip.name
|
||||
|
||||
templates.filter { it.enabled(project) }.forEach { template ->
|
||||
zip.write(template.path(project), template.render(project))
|
||||
zip.write(projectName + "/" + template.path(project), template.render(project))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user