From 09ed9d044495971c143dc8c9879dd92d3989976f Mon Sep 17 00:00:00 2001 From: ShuiRuTian <158983297@qq.com> Date: Sun, 10 Jan 2021 14:10:36 +0800 Subject: fix issue. --- editors/code/src/client.ts | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'editors') diff --git a/editors/code/src/client.ts b/editors/code/src/client.ts index 2a8f2deb4..fb8cd4873 100644 --- a/editors/code/src/client.ts +++ b/editors/code/src/client.ts @@ -58,6 +58,13 @@ export function createClient(serverPath: string, cwd: string, extraEnv: Env): lc // 2. filter some change in here. // 2.1 rename from or to `mod.rs` should be special. // 2.2 not all folder change should be cared, only those have files with ".rs" postfix. + let newFiles = data.files.map((file)=>{ + const isFolder = !file.oldUri.path.endsWith(".rs"); + return !isFolder ? file : { + oldUri:vscode.Uri.file(file.oldUri.path+'/'), + newUri:vscode.Uri.file(file.newUri.path+'/') + }}); + data = {...data, files:newFiles}; return next(data); } } -- cgit v1.2.3