Fix pause toggle: never delete the flag file

The FileView watcher fires on content changes but not on deletion, so
resuming (rm of the flag) left the panel and the menu stuck paused.
Rewrite the flag with 0 or 1 instead, matching the state-file pattern
that already works.
This commit is contained in:
felixzsh
2026-08-11 14:03:12 -05:00
parent f255fa05e9
commit 34646dec28
3 changed files with 8 additions and 3 deletions
+3 -1
View File
@@ -166,9 +166,11 @@ Item {
function setPaused(p) {
if (p === root.paused) return
// Always rewrite the flag with "0" or "1", never delete it: the
// FileView watcher fires on content changes but not on deletion.
var cmd = p
? "printf 1 > " + Util.shellQuote(root.pausePath)
: "rm -f " + Util.shellQuote(root.pausePath)
: "printf 0 > " + Util.shellQuote(root.pausePath)
pauseToggleProc.command = ["sh", "-c", cmd]
pauseToggleProc.running = true
}