more UriComponents in mainThread-land, #40169

This commit is contained in:
Johannes Rieken
2017-12-13 17:44:26 +01:00
parent 7f71248784
commit 067d266d90
5 changed files with 24 additions and 23 deletions

View File

@@ -4,6 +4,7 @@
*--------------------------------------------------------------------------------------------*/
'use strict';
import URI from 'vs/base/common/uri';
import { isFalsyOrEmpty } from 'vs/base/common/arrays';
import { MainThreadDiaglogsShape, MainContext, IExtHostContext, MainThreadDialogOpenOptions, MainThreadDialogSaveOptions } from '../node/extHost.protocol';
import { extHostNamedCustomer } from 'vs/workbench/api/electron-browser/extHostCustomers';
@@ -56,7 +57,7 @@ export class MainThreadDialogs implements MainThreadDiaglogsShape {
result.buttonLabel = options.openLabel;
}
if (options.defaultUri) {
result.defaultPath = options.defaultUri.fsPath;
result.defaultPath = URI.revive(options.defaultUri).fsPath;
}
if (!options.canSelectFiles && !options.canSelectFolders) {
options.canSelectFiles = true;
@@ -82,7 +83,7 @@ export class MainThreadDialogs implements MainThreadDiaglogsShape {
};
if (options.defaultUri) {
result.defaultPath = options.defaultUri.fsPath;
result.defaultPath = URI.revive(options.defaultUri).fsPath;
}
if (options.saveLabel) {
result.buttonLabel = options.saveLabel;