use correct uri manipulation, #25539

This commit is contained in:
Johannes Rieken
2017-04-27 14:16:59 +02:00
parent 4679fef06e
commit 13b11919c6
3 changed files with 10 additions and 11 deletions

View File

@@ -227,7 +227,7 @@ export class MainThreadDocuments extends MainThreadDocumentsShape {
}
private _handleUnititledScheme(uri: URI): TPromise<boolean> {
let asFileUri = URI.file(uri.fsPath);
let asFileUri = uri.with({ scheme: 'file' });
return this._fileService.resolveFile(asFileUri).then(stats => {
// don't create a new file ontop of an existing file
return TPromise.wrapError<boolean>('file already exists on disk');