mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 10:58:30 -05:00
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:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user