Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/microsoft/vscode.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Pasero <benjamin.pasero@microsoft.com>2022-07-13 12:56:15 +0300
committerGitHub <noreply@github.com>2022-07-13 12:56:15 +0300
commit4404dc63561a286e13f9ba5a669e5403a367425a (patch)
treee6fb6436cbf94d4f26271f84281e0292e98e6cfb /src/vs/workbench
parent5737c7eea15e195edde1e9228238cddbf3e93c1d (diff)
Explorer: cannot copy paste anymore to duplicate file with sandbox enabled (fix #154820) (#155044)
* Explorer: cannot copy paste anymore to duplicate file with sandbox enabled (fix #154820) * skip smudge!
Diffstat (limited to 'src/vs/workbench')
-rw-r--r--src/vs/workbench/services/clipboard/electron-sandbox/clipboardService.ts6
-rw-r--r--src/vs/workbench/test/electron-browser/workbenchTestServices.ts5
2 files changed, 6 insertions, 5 deletions
diff --git a/src/vs/workbench/services/clipboard/electron-sandbox/clipboardService.ts b/src/vs/workbench/services/clipboard/electron-sandbox/clipboardService.ts
index 8e3f25df564..326d09c3a37 100644
--- a/src/vs/workbench/services/clipboard/electron-sandbox/clipboardService.ts
+++ b/src/vs/workbench/services/clipboard/electron-sandbox/clipboardService.ts
@@ -56,11 +56,11 @@ export class NativeClipboardService implements IClipboardService {
return this.nativeHostService.hasClipboard(NativeClipboardService.FILE_FORMAT);
}
- private resourcesToBuffer(resources: URI[]): Uint8Array {
- return VSBuffer.fromString(resources.map(r => r.toString()).join('\n')).buffer;
+ private resourcesToBuffer(resources: URI[]): VSBuffer {
+ return VSBuffer.fromString(resources.map(r => r.toString()).join('\n'));
}
- private bufferToResources(buffer: Uint8Array): URI[] {
+ private bufferToResources(buffer: VSBuffer): URI[] {
if (!buffer) {
return [];
}
diff --git a/src/vs/workbench/test/electron-browser/workbenchTestServices.ts b/src/vs/workbench/test/electron-browser/workbenchTestServices.ts
index 3a35d0f4018..f4fce1346e2 100644
--- a/src/vs/workbench/test/electron-browser/workbenchTestServices.ts
+++ b/src/vs/workbench/test/electron-browser/workbenchTestServices.ts
@@ -54,6 +54,7 @@ import { joinPath } from 'vs/base/common/resources';
import { UserDataProfileService } from 'vs/workbench/services/userDataProfile/common/userDataProfileService';
import { IUserDataProfileService } from 'vs/workbench/services/userDataProfile/common/userDataProfile';
import { UriIdentityService } from 'vs/platform/uriIdentity/common/uriIdentityService';
+import { VSBuffer } from 'vs/base/common/buffer';
const args = parseArgs(process.argv, OPTIONS);
@@ -272,8 +273,8 @@ export class TestNativeHostService implements INativeHostService {
async writeClipboardText(text: string, type?: 'selection' | 'clipboard' | undefined): Promise<void> { }
async readClipboardFindText(): Promise<string> { return ''; }
async writeClipboardFindText(text: string): Promise<void> { }
- async writeClipboardBuffer(format: string, buffer: Uint8Array, type?: 'selection' | 'clipboard' | undefined): Promise<void> { }
- async readClipboardBuffer(format: string): Promise<Uint8Array> { return Uint8Array.from([]); }
+ async writeClipboardBuffer(format: string, buffer: VSBuffer, type?: 'selection' | 'clipboard' | undefined): Promise<void> { }
+ async readClipboardBuffer(format: string): Promise<VSBuffer> { return VSBuffer.wrap(Uint8Array.from([])); }
async hasClipboard(format: string, type?: 'selection' | 'clipboard' | undefined): Promise<boolean> { return false; }
async sendInputEvent(event: MouseInputEvent): Promise<void> { }
async windowsGetStringRegKey(hive: 'HKEY_CURRENT_USER' | 'HKEY_LOCAL_MACHINE' | 'HKEY_CLASSES_ROOT' | 'HKEY_USERS' | 'HKEY_CURRENT_CONFIG', path: string, name: string): Promise<string | undefined> { return undefined; }