Sanitize db name for dacpac/bacpac file names (#5479)

* Sanitize db name for filename

* Add unit tests

* lower timeout to 60 seconds

* add extra coverageConfig.json and missing character check
This commit is contained in:
kisantia
2019-05-14 15:00:28 -07:00
committed by GitHub
parent be60ad6766
commit 48ba9ce175
12 changed files with 1496 additions and 6 deletions

View File

@@ -12,6 +12,7 @@ import * as path from 'path';
import { DataTierApplicationWizard } from '../dataTierApplicationWizard';
import { DacFxDataModel } from './models';
import { BasePage } from './basePage';
import { sanitizeStringForFilename } from './utils';
const localize = nls.loadMessageBundle();
@@ -147,7 +148,7 @@ export abstract class DacFxConfigPage extends BasePage {
}
protected generateFilePathFromDatabaseAndTimestamp(): string {
return path.join(this.getRootPath(), this.model.database + '-' + this.getDateTime() + this.fileExtension);
return path.join(this.getRootPath(), sanitizeStringForFilename(this.model.database) + '-' + this.getDateTime() + this.fileExtension);
}
protected getDateTime(): string {