From c66a842ce4679a3ffa5504dad39b1402bea75e9f Mon Sep 17 00:00:00 2001 From: Lukasz Kasprzak Date: Mon, 14 Sep 2026 23:07:57 +0200 Subject: plan 10 re-check: cut run column, damaged undo run, emptied directory cleanup, text turning binary, explain flags, interrupt docs --- docs/design.md | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'docs/design.md') diff --git a/docs/design.md b/docs/design.md index 28c7c80..6b94fc8 100644 --- a/docs/design.md +++ b/docs/design.md @@ -204,7 +204,9 @@ cannot read the file (over `max-read`, a tool missing, failing or timing out), the exclude holds, and the file is set aside as "(content unreadable)" with the warning. A file whose format has no text at all (an image, an archive) is not unreadable: it contains no keyword, so its -content tests are simply false and raise no warning. An exclude protects files, so a file krino +content tests are simply false and raise no warning. A file of no known +extension that starts as text and holds binary data further on is +unreadable. An exclude protects files, so a file krino could not check is left alone. Mistakes in krino.conf's excludes are reported even while no directory is included. @@ -322,7 +324,7 @@ Nothing is deleted, and undo restores them. | Format | Method | |---|---| -| text | known text extensions, or detected from the first 8 KiB: valid UTF-8, or UTF-16 with a BOM, and no NUL bytes | +| text | known text extensions, or detected from the first 8 KiB: valid UTF-8, or UTF-16 with a BOM, and no NUL bytes. A file detected as text that holds a NUL or invalid UTF-8 further on cannot be read (§4.6, §5.4) | | pdf | `pdftotext -q -enc UTF-8 FILE -`, 30 s timeout | | docx xlsx pptx odt ods odp epub | zip plus streaming XML, Go standard library | | html xml | tags removed, entities decoded | @@ -715,7 +717,8 @@ Exit status: 0 success, including nothing to do and everything declined; A config error anywhere stops the whole run before any scanning: krino never acts on a config it only partly understood. Ctrl-C (SIGTERM, or SIGHUP unless started under `nohup`) during apply finishes the current step, logs it, skips -the rest of that file's chain, and stops. A second interrupt exits at once: +the rest of that file's chain, and stops; during an undo it finishes reversing +the file it is on, then stops. A second interrupt exits at once: the step in flight is not logged, and a copy in progress can leave a temporary `.krino-*` file and an empty directory behind. A second krino on the same directory waits for the lock, or fails immediately with `-y` (so a cron job never piles up). -- cgit v1.3