Repository navigation
Conversation
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.
Category
This change is exactly one of the following (please change
[ ]to[x]) to indicate which:Description
Fixes #2190. When a download fails because the device is out of disk space (ENOSPC), RipMe used to just log an error for that one file and move on — the rest of the current album, and every other album still queued, would keep trying to download and keep hitting the same out-of-space error. This change makes an ENOSPC error cancel the rest of the current album immediately and stop the rest of the queue, in both the GUI and the CLI batch modes (
-r,-R,-f).Design:
com.rarchives.ripme.utils.RipStatus— a tiny, dependency-free holder for a single process-wide "cancel everything" flag (requestPanicAll()/consumePanicAll()). It deliberately does not live onMainWindow:MainWindowhas severalstaticSwing field initializers (e.g.new JLabel()), so merely referencing that class from code that might run headless (CLI batch mode has noMainWindowinstance at all) risks aHeadlessExceptionwith no display attached.RipStatushas no such baggage, soDownloadFileThreadcan signal a cancellation regardless of whether a GUI exists.DownloadFileThread— in the existing ENOSPC catch branch, now callsobserver.panic()(stops the rest of the current album — this mechanism already existed but wasn't being used here) andRipStatus.requestPanicAll()(signals that the rest of the queue should stop too).MainWindow#ripNextAlbum()— added a check forRipStatus.consumePanicAll()alongside the existingwasGracefulStop/wasPanicStopcheck, so the GUI's queue loop stops pulling the next album once a disk-full panic has been requested.App#handleArguments()— added the same stop-check-and-break to the three CLI batch loops that had no abort mechanism at all before this:-r(re-rip all),-R(re-rip selected), and-f(urls-file).A pre-existing bug I found but did not fix here: in
ripNextAlbum():wasPanicStopreadsgracefulStopa second time instead ofpanicStop.getAndSet(false)— looks like a copy/paste slip. I left it as-is and added an independent, correctly-wired check instead, so this PR doesn't depend on that line being right and doesn't change panic-button behavior that's outside this issue's scope. Flagging it here in case it's worth a follow-up issue.Testing
Required verification:
gradlew test(there are no new failures or errors).Optional but recommended: