fix(userTransfer): honour .rtorrentDisable opt-out on post-transfer restart (Refs #869) - #929
Shabbir7890 wants to merge 2 commits into
Conversation
…estart (Refs MagnaCapax#869) pmssUserTransferRequestRtorrentRestart() unconditionally touched the restart marker and ran the restart after a transfer, ignoring the per-user `.rtorrentDisable` opt-out that checkRtorrent honours on every cycle (GH#470). A user who had deliberately disabled rTorrent got it restarted (and their session reloaded) after any migration, until the next watchdog pass stopped it again. Skip the restart when the marker is present, matching checkRtorrent.php.
|
Validation update — I can now run the repository's own development container, so this is no longer "reviewed but not run". No test count change. Those 25 baseline failures are not this branch: they are present on a clean Run with |
|
Thank you for this. The fix is right, and it sits in the right place. The gap started on 2026-08-17. The
I reviewed the code statically against current main. I have not run the suite, and CI has not run on this PR yet. Verdict: merge after one fix.
Out of scope for this PR: other rTorrent start paths also ignore the opt-out, namely the ruTorrent panel restart via (Off means off, even mid-voyage.) |
…ansfer restart (Refs MagnaCapax#869) Adds the behaviour test requested on the PR: pmssUserTransferRequestRtorrentRestart() skips and logs the opt-out when ~/.rtorrentDisable is present, and requests the restart marker when it is absent. Runs under PMSS_DRY_RUN so it is hermetic (runStep logs the step without executing touch/chown), matching the existing session-rewrite tests.
|
Added the behaviour test you asked for (b53e814).
The branch is 77 commits behind main but still merges cleanly; happy to rebase whenever you'd like. |
Honours the per-user
.rtorrentDisableopt-out on the post-transfer restart path, matching what checkRtorrent already does on every cycle.pmssUserTransferRequestRtorrentRestart() unconditionally touched the restart
marker and ran the restart after a transfer, ignoring the per-user
.rtorrentDisableopt-out that checkRtorrent honours on every cycle (GH#470).A user who had deliberately disabled rTorrent got it restarted (and their
session reloaded) after any migration, until the next watchdog pass stopped it
again. Skip the restart when the marker is present, matching checkRtorrent.php.
Authored from the private disclosure thread, moved here as a PR at the maintainer's suggestion so the diff arrives apply-able rather than as a ticket attachment.
Not linted or test-run: there is no PHP toolchain or Debian box on the authoring machine.
bash -n/sh -npass on every shell file touched, and the patch applies cleanly tomain@8598305. Pleasephp -land run the dev suite before merge.