github/Shimmer — pull request #126 by shiftkey (2013-09-10 04:09:01+00:00)
Title: Uninstall should be amazing

Resolving #74

Fixes:

- a stupid enumeration thing I introduced
- moved some diagnostics out to debug to slim down normal logs

TODO:

- [ ] on uninstall, deleting the directory supposedly fails as it's not empty, but upon inspection the folder is empty (race condition?)

```
ERROR | 2013-09-10 01:27:46 PM +09 | Utility: DeleteDirectory: could not delete -
C:\Users\brendanforster\AppData\Local\TestApp: System.IO.IOException: The directory is not empty.

at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.Directory.DeleteHelper(String fullPath, String userPath, Boolean recursive,
Boolean throwOnTopLevelDirectoryNotFound)
at System.IO.Directory.Delete(String fullPath, String userPath, Boolean recursive,
Boolean checkHost)
at System.IO.Directory.Delete(String path, Boolean recursive)
at Shimmer.Core.Utility.DeleteDirectory(String directoryPath)
WARN | 2013-09-10 01:27:46 PM +09 | UpdateManager: Full Uninstall tried to delete root
dir but failed, punting until next reboot: System.IO.IOException: The directory is not empty.

at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.Directory.DeleteHelper(String fullPath, String userPath, Boolean recursive,
Boolean throwOnTopLevelDirectoryNotFound)
at System.IO.Directory.Delete(String fullPath, String userPath, Boolean recursive,
Boolean checkHost)
at System.IO.Directory.Delete(String path, Boolean recursive)
at Shimmer.Core.Utility.DeleteDirectory(String directoryPath)
at Shimmer.Client.UpdateManager.b__26()
ERROR | 2013-09-10 01:27:46 PM +09 | Utility: safeDeleteFileAtNextReboot: failed -
C:\Users\brendanforster\AppData\Local\TestApp
INFO | 2013-09-10 01:27:49 PM +09 | InstallManager: Full uninstall OnNext: ()
INFO | 2013-09-10 01:27:49 PM +09 | InstallManager: Full uninstall OnCompleted
```