Skip to content

Commit 18cbf48

Browse files
authored
getVirtualSourceRoot 返回对象的副本,而不是引用
1 parent 8110c25 commit 18cbf48

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/EIDEProject.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ import { WebPanelManager } from './WebPanelManager';
5757
import { DependenceManager } from './DependenceManager';
5858
import * as platform from './Platform';
5959
import { IDebugConfigGenerator } from './DebugConfigGenerator';
60-
import { md5, copyObject, compareVersion, isGccFamilyToolchain } from './utility';
60+
import { md5, copyObject, compareVersion, isGccFamilyToolchain, deepCloneObject } from './utility';
6161
import { ResInstaller } from './ResInstaller';
6262
import {
6363
view_str$prompt$not_found_compiler, view_str$operation$name_can_not_be_blank,
@@ -1201,7 +1201,7 @@ export abstract class AbstractProject implements CustomConfigurationProvider, Pr
12011201
}
12021202

12031203
getVirtualSourceRoot(): VirtualFolder {
1204-
return this.virtualSource.getRoot();
1204+
return deepCloneObject(this.virtualSource.getRoot());
12051205
}
12061206

12071207
getVirtualSourceManager(): VirtualSource {

0 commit comments

Comments
 (0)