(path string)
| 192 | } |
| 193 | |
| 194 | func removeShadowPlugin(path string) { |
| 195 | if path == "" { |
| 196 | return |
| 197 | } |
| 198 | if errRemove := os.Remove(path); errRemove == nil { |
| 199 | return |
| 200 | } |
| 201 | pathPtr, errPath := windows.UTF16PtrFromString(path) |
| 202 | if errPath != nil { |
| 203 | return |
| 204 | } |
| 205 | _ = windows.MoveFileEx(pathPtr, nil, windows.MOVEFILE_DELAY_UNTIL_REBOOT) |
| 206 | } |
| 207 | |
| 208 | func removeStaleShadowPlugins(dir string) { |
| 209 | entries, errRead := os.ReadDir(dir) |
no test coverage detected