[TECH] Improve Patching process to avoid file and directory removal errors#1258
Open
flavioislima wants to merge 8 commits intomainfrom
Open
[TECH] Improve Patching process to avoid file and directory removal errors#1258flavioislima wants to merge 8 commits intomainfrom
flavioislima wants to merge 8 commits intomainfrom
Conversation
…related async calls
… in safeRemoveDirectory
…and simplifying removal logic
biliesilva
approved these changes
Mar 21, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request includes multiple changes to the
hyperplaypackage to enhance directory removal safety and improve patching event tracking. The key changes involve the introduction of a new utility function for safe directory removal, updates to the patching process to handle cleanup more robustly, and the addition of new patching event types.Improvements to directory removal:
src/backend/storeManagers/hyperplay/utils.ts: Added thesafeRemoveDirectoryfunction to handle directory removal with retry logic and support for async removal based on directory size.Enhancements to patching process:
src/backend/storeManagers/hyperplay/games.ts: Updated various functions (cleanUpDownload,onCancel,extract,applyPatching) to usesafeRemoveDirectoryinstead ofrmSyncfor directory cleanup. [1] [2] [3] [4] [5] [6] [7] [8] [9]Addition of new patching event types:
src/backend/metrics/types.ts: AddedPatchingAbortedandPatchingCleanupFailedinterfaces to track new patching events and updated thePossibleMetricPayloadstype to include these new events. [1] [2]Minor version bump:
package.json: Updated the package version from0.23.3to0.24.0.Other changes:
src/backend/storeManagers/hyperplay/games.ts: AddedsafeRemoveDirectoryto the list of imported utilities.src/backend/utils.ts: Updated thedownloadFilefunction'sonCancelparameter to return aPromise<void>.src/backend/storeManagers/hyperplay/utils.ts: AddedlogWarningandcaptureExceptionimports for enhanced logging and error tracking.Use the following Checklist if you have changed something on the Backend or Frontend: