🎨 Support one-click addition of Microsoft Defender exclusions https://github.com/siyuan-note/siyuan/issues/13650

This commit is contained in:
Daniel 2024-12-29 12:25:36 +08:00
parent 3d7baaba5f
commit 8ad7d6aae2
No known key found for this signature in database
GPG key ID: 86211BA83DF03017
5 changed files with 8 additions and 7 deletions

View file

@ -18,5 +18,6 @@
package model
func AutoProcessMicrosoftDefender() {
}
func AddMicrosoftDefenderExclusion() (err error) {}
func AutoProcessMicrosoftDefender() {}

View file

@ -63,7 +63,7 @@ func AddMicrosoftDefenderExclusion() (err error) {
}
} else {
logging.LogInfof("current user is not admin, use elevator to add Windows Defender exclusion path [%s, %s]", installPath, util.WorkspaceDir)
elevator := filepath.Join(util.WorkingDir, "elevator.exe")
elevator := filepath.Join(util.WorkingDir, "kernel", "elevator.exe")
if "dev" == util.Mode || !gulu.File.IsExist(elevator) {
elevator = filepath.Join(util.WorkingDir, "elevator", "elevator-"+runtime.GOARCH+".exe")
}