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:
+3
-1
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user