build(aio): ensure downloadable zip filenames are unique (#20586)

Fixes #16227

PR Close #20586
This commit is contained in:
George Kalpakas
2017-11-22 15:58:21 +02:00
committed by Miško Hevery
parent 2b0c896d78
commit c70cd258d5

View File

@ -62,7 +62,7 @@ class ExampleZipper {
let exampleZipName;
const exampleType = this._getExampleType(path.join(sourceDirName, relativeDirName));
if (relativeDirName.indexOf('/') !== -1) { // Special example
exampleZipName = relativeDirName.split('/')[0];
exampleZipName = relativeDirName.split('/').join('-');
} else {
exampleZipName = jsonFileName.replace(/(plnkr|zipper).json/, relativeDirName);
}