Signed-off-by: Daniel <845765@qq.com>
This commit is contained in:
Daniel 2026-03-02 22:28:51 +08:00
parent b32a719772
commit 6071ced2af
No known key found for this signature in database
GPG key ID: 86211BA83DF03017

View file

@ -380,6 +380,17 @@ func IsSensitivePath(p string) bool {
}
}
// Windows 开始启动菜单路径(小写比较)
startMenuPrefixes := []string{
strings.ToLower(filepath.Join(os.Getenv("APPDATA"), "Microsoft", "Windows", "Start Menu")),
strings.ToLower(filepath.Join(os.Getenv("ProgramData"), "Microsoft", "Windows", "Start Menu")),
}
for _, sp := range startMenuPrefixes {
if strings.HasPrefix(pp, sp) {
return true
}
}
homePrefixes := []string{
strings.ToLower(filepath.Join(HomeDir, ".ssh")),
strings.ToLower(filepath.Join(HomeDir, ".config")),