-
Notifications
You must be signed in to change notification settings - Fork 402
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: uninstall extension failed in electron #2469
Conversation
cf6ff94
to
1405b83
Compare
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## v2.23 #2469 +/- ##
==========================================
+ Coverage 52.76% 57.74% +4.98%
==========================================
Files 1323 1323
Lines 83472 83472
Branches 17374 17374
==========================================
+ Hits 44046 48205 +4159
+ Misses 35789 32045 -3744
+ Partials 3637 3222 -415
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 106 files with indirect coverage changes Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report in Codecov by Sentry. |
/publish |
🎉 PR Next version 2.23.2-next-1679551981.0 publish successful! You can install prerelease version via
/home/runner/work/_temp/_runner_file_commands/step_summary_44383e2c-0cb6-42e1-b526-d772b8d50b5e |
ChatGPT Code Review: CodeReview: 这段代码修改的是 在修改前的代码中,判断条件是 修改后的代码如果 代码修改建议: 无需修改,这段代码已经实现功能,且修改后的代码相较于修改前,更为健壮易读。 commit message: chore(file-service): fix uninstall extension failed in electron 将 file-service 模块改动提交至代码仓库中,并修正 electron 情况下卸载扩展失败的问题。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, 相关问题 #2410
@yantze 这个在windows上还是有问题。windows上uriString传进来的是C:\xxx\xxx\这种格式的,没有scheme,导致uri.scheme === Schemes.file判断的时候没有走进去。 |
可以提供一下复现路径,目前没有在 OpenSumi 2.23.2 版本上复现这个问题 |
确实是 uriString 没有进行处理,我这边修复一下 |
已提交 #2548 |
Types
Background or solution
close opensumi/ide-electron#64
electron 环境卸载插件调用了 fileService.delete, delete 实现中判断如果是 electron 并且设置了 moveToTrash 就会使用 electron 的 api 删除文件。但如果没有设置 moveToTrash 标记,就会走原始的删除文件。原始的删除文件在 mac 下会报错, 找不到 app/node/macos-trash 可执行文件。
在 ide-electron 环境中,删除插件其实移到 Trash 可能更好,避免一些误操作导致文件无法恢复。
Changelog
修复 ide-electron 环境卸载插件失败的问题