mirror of
https://github.com/Microsoft/vscode
synced 2024-09-19 02:26:04 +00:00
sandbox - enable sandboxed file service by default
This commit is contained in:
parent
e418b6bf3e
commit
d781c69d7e
|
@ -34,7 +34,6 @@ import { IUndoRedoService } from 'vs/platform/undoRedo/common/undoRedo';
|
||||||
import { IExplorerService } from 'vs/workbench/contrib/files/browser/files';
|
import { IExplorerService } from 'vs/workbench/contrib/files/browser/files';
|
||||||
import { FileEditorInputSerializer, FileEditorWorkingCopyEditorHandler } from 'vs/workbench/contrib/files/browser/editors/fileEditorHandler';
|
import { FileEditorInputSerializer, FileEditorWorkingCopyEditorHandler } from 'vs/workbench/contrib/files/browser/editors/fileEditorHandler';
|
||||||
import { ModesRegistry } from 'vs/editor/common/modes/modesRegistry';
|
import { ModesRegistry } from 'vs/editor/common/modes/modesRegistry';
|
||||||
import product from 'vs/platform/product/common/product';
|
|
||||||
|
|
||||||
class FileUriLabelContribution implements IWorkbenchContribution {
|
class FileUriLabelContribution implements IWorkbenchContribution {
|
||||||
|
|
||||||
|
@ -311,7 +310,7 @@ configurationRegistry.registerConfiguration({
|
||||||
'files.experimentalSandboxedFileService': {
|
'files.experimentalSandboxedFileService': {
|
||||||
'type': 'boolean',
|
'type': 'boolean',
|
||||||
'description': nls.localize('files.experimentalSandboxedFileService', "Experimental: changes the file service to be sandboxed. Do not change this unless instructed!"),
|
'description': nls.localize('files.experimentalSandboxedFileService', "Experimental: changes the file service to be sandboxed. Do not change this unless instructed!"),
|
||||||
'default': product.quality !== 'stable',
|
'default': true,
|
||||||
'scope': ConfigurationScope.APPLICATION
|
'scope': ConfigurationScope.APPLICATION
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,7 +14,6 @@ import { INativeHostService } from 'vs/platform/native/electron-sandbox/native';
|
||||||
import { SharedDesktopMain } from 'vs/workbench/electron-sandbox/shared.desktop.main';
|
import { SharedDesktopMain } from 'vs/workbench/electron-sandbox/shared.desktop.main';
|
||||||
import { IMainProcessService } from 'vs/platform/ipc/electron-sandbox/services';
|
import { IMainProcessService } from 'vs/platform/ipc/electron-sandbox/services';
|
||||||
import { ISharedProcessWorkerWorkbenchService } from 'vs/workbench/services/sharedProcess/electron-sandbox/sharedProcessWorkerWorkbenchService';
|
import { ISharedProcessWorkerWorkbenchService } from 'vs/workbench/services/sharedProcess/electron-sandbox/sharedProcessWorkerWorkbenchService';
|
||||||
import product from 'vs/platform/product/common/product';
|
|
||||||
|
|
||||||
class DesktopMain extends SharedDesktopMain {
|
class DesktopMain extends SharedDesktopMain {
|
||||||
|
|
||||||
|
@ -28,7 +27,7 @@ class DesktopMain extends SharedDesktopMain {
|
||||||
|
|
||||||
// Local Files
|
// Local Files
|
||||||
let diskFileSystemProvider: ElectronFileSystemProvider | SandboxedDiskFileSystemProvider;
|
let diskFileSystemProvider: ElectronFileSystemProvider | SandboxedDiskFileSystemProvider;
|
||||||
if (this.configuration.experimentalSandboxedFileService ?? product.quality !== 'stable') {
|
if (this.configuration.experimentalSandboxedFileService !== false) {
|
||||||
logService.info('[FileService]: Using sandbox ready file system provider');
|
logService.info('[FileService]: Using sandbox ready file system provider');
|
||||||
diskFileSystemProvider = this._register(new SandboxedDiskFileSystemProvider(mainProcessService, sharedProcessWorkerWorkbenchService, logService));
|
diskFileSystemProvider = this._register(new SandboxedDiskFileSystemProvider(mainProcessService, sharedProcessWorkerWorkbenchService, logService));
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in a new issue