Skip to content

Commit

Permalink
#24 add table name to data export filename for files with multiple da…
Browse files Browse the repository at this point in the history
…ta sets
  • Loading branch information
RandomFractals committed Jun 12, 2019
1 parent cd7ef09 commit b060fb1
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/data.preview.ts
Original file line number Diff line number Diff line change
Expand Up @@ -600,7 +600,13 @@ export class DataPreview {
* @param fileData File data to save.
*/
private async saveData(fileType: string, fileData: any): Promise<void> {
const dataFilePath: string = this._uri.fsPath.replace(this._fileExtension, fileType);
let dataFilePath: string = this._uri.fsPath.replace(this._fileExtension, '');
if (this._dataTable.length > 0) {
// append data table name to new config or data export file name
dataFilePath += `-${this._dataTable}.`;
}
// add requested data file ext.
dataFilePath += fileType;
this._logger.debug('saveData(): saving data file:', dataFilePath);

// display save file dialog
Expand Down

0 comments on commit b060fb1

Please sign in to comment.