mirror of
https://github.com/KillzXGaming/Switch-Toolbox
synced 2024-11-28 23:40:25 +00:00
0d33f4ead1
* Updater Fix/Improvements In SetAccessRule(): A call to the Directory.SetAccessControl method was added to apply the changes made to the DirectorySecurity object. Additionally, the function does not handle possible exceptions that may occur during code execution. This version of the function attempts to set the access rule for the specified directory and, if an error occurs during the process, prints an error message on the screen. This helps to identify and fix possible problems that may occur during code execution. In Install(): The function checks if the destination directory exists before attempting to delete it. Additionally, a destDir variable was created to store the path of the 'destination directory' and a destFile variable to store the path of the 'destination file'. This makes the code a little more readable. In Application_Idle(): A MessageBox.Show was included to display a dialog box with the message "Updates are available. Do you want to update now?" and two buttons: "Yes" and "No". If the user clicks on the "Yes" button, the UpdateNotifcationClick method is called to start the update process. Otherwise, the dialog box is closed and no action is taken. The dialog box will only be shown once for each available update, as the UsePrompt variable is set to false after the dialog box is shown for the first time. when trying to update, updater.exe crashed and presented the following error, as shown in the print below: unhandled exception: Unable to create a file that already exists. * Updater Fix/Improvements |
||
---|---|---|
.. | ||
Properties | ||
App.config | ||
Program.cs | ||
Updater.csproj |