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 de78307928
commit 89de98b25e
1 changed files with 1 additions and 1 deletions

View File

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