File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change 66 Uri
77} from 'vscode' ;
88
9+ import * as fs from 'fs' ;
910import * as path from 'path' ;
1011
1112import { ViewCommands } from './viewCommands' ;
@@ -31,8 +32,12 @@ export async function registerOpenDataFileCommand(context: ExtensionContext) {
3132 `Tabular Data Viewer requires a valid \`file:///\` or \`https://\` data file Url \
3233 to display Table View. Invalid data document Url: \`${ dataFileUrl } \`.` ) ;
3334 }
35+ else if ( dataFileUrl ?. startsWith ( 'file:///' ) && ! fs . existsSync ( dataFileUri . fsPath ) ) {
36+ window . showErrorMessage (
37+ `Unable to locate requested data file: \`${ dataFileUrl } \`.` ) ;
38+ }
3439 else if ( ( < any > Object ) . values ( FileTypes ) . includes ( fileExtension ) ) {
35- // open table view for the data file
40+ // open table view for requested remote or local data file
3641 commands . executeCommand ( ViewCommands . viewTable , dataFileUri ) ;
3742 }
3843 else if ( fileExtension . length === 0 ) {
You can’t perform that action at this time.
0 commit comments