scheme and path or authoriy are mandated, fixes #2341

This commit is contained in:
Johannes Rieken
2016-01-27 11:36:53 +01:00
parent 9ce2dd1355
commit 8755e438f5
2 changed files with 28 additions and 2 deletions

View File

@@ -581,8 +581,8 @@ export class MainThreadDocuments {
_tryOpenDocument(uri: URI): TPromise<any> {
if (!uri.scheme || !uri.fsPath) {
return TPromise.wrapError('Uri must have scheme and path. One or both are missing in: ' + uri.toString());
if (!uri.scheme || !(uri.fsPath || uri.authority)) {
return TPromise.wrapError(`Invalid uri. Scheme and authority or path must be set.`);
}
let promise: TPromise<boolean>;