Skip to content

Commit

Permalink
#151 use path.extname for data file ext. extraction
Browse files Browse the repository at this point in the history
  • Loading branch information
RandomFractals committed Sep 29, 2019
1 parent 595d9f0 commit d58ecb7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/data.preview.ts
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ export class DataPreview {
this._dataViews = (views !== undefined) ? views: {};
this._viewConfig = viewConfig;
this._fileName = path.basename(uri.fsPath);
this._fileExtension = this._fileName.substr(this._fileName.lastIndexOf('.'));
this._fileExtension = path.extname(this._fileName); // file extension
this._previewUri = this._uri.with({scheme: 'data'});

// parse view config
Expand Down

0 comments on commit d58ecb7

Please sign in to comment.