This repository has no description
0

Configure Feed

Select the types of activity you want to include in your feed.

services.flix: don't fail flix-index when a file vanishes mid-scan

/var/download churns constantly (download temp files appearing and
vanishing), so `find` exits non-zero when an entry disappears between
readdir and stat. Under `set -efu` that aborted the oneshot, which during
a nixos switch counted as a failed unit and flipped the whole switch to a
non-zero exit. Tolerate find's exit code and only replace the live index
if a non-empty listing was produced.

Assisted-by: Claude Code (claude-opus-4-8)

+8 -2
+8 -2
2configs/services/flix/default.nix
··· 372 372 ExecStart = pkgs.writers.writeDash "flix-index" '' 373 373 set -efu 374 374 index(){ 375 - find . -type f > "$DIR"/index.tmp 376 - mv "$DIR"/index.tmp "$DIR"/index 375 + # /var/download churns constantly (download temp files appearing and 376 + # vanishing), so find can exit non-zero when an entry disappears 377 + # mid-scan. Ignore that — the entries we did enumerate are still valid 378 + # — but only replace the live index if we actually produced one. 379 + find . -type f > "$DIR"/index.tmp || : 380 + if [ -s "$DIR"/index.tmp ]; then 381 + mv "$DIR"/index.tmp "$DIR"/index 382 + fi 377 383 } 378 384 379 385 DIR=/var/download