You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This discussion was converted from issue #2401 on March 14, 2023 07:08.
Heading
Bold
Italic
Quote
Code
Link
Numbered list
Unordered list
Task list
Attach files
Mention
Reference
Menu
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
背景
当前,在 OpenSumi 内部,默认采用了 trash 5.2.0 这个库用于文件删除功能实现,仅在 Windows 下删除
node_modules
情况下直接使用原生删除,见代码:core/packages/workspace-edit/src/browser/workspace-edit.service.ts
Line 301 in 1df4974
trash 后续 发行版本 中新增了不少性能优化及针对苹果原生芯片删除的支持,建议可以做一下升级
该改造与 移除对 isElectronRenderer 的判断 有一定的相关性。
可能的问题
原来不升级的背景是为了兼容 Electron 下的 Windows 7 (6.0.0 版本 开始移除了对 Windows 7 的支持)
解决方案:
在 Electron 下可以通过
shell
模块中的await shell.trashItem(filePath);
去实现该能力,需要对 Electron 下使用的DiskFileSystemProvider
进行覆盖Beta Was this translation helpful? Give feedback.
All reactions