mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-24 21:38:07 -05:00
scripts: Show disk-space warning when under the min of the thresholds.
Follow-up to 71c3c3df92
which got the logic
wrong.
* guix/scripts.scm (warn-about-disk-space): Compare AVAILABLE to the min of
RELATIVE-THRESHOLD-IN-BYTES and ABSOLUTE-THRESHOLD-IN-BYTES, not the max.
This commit is contained in:
parent
bc8b2ffdac
commit
1d24cc6de6
1 changed files with 1 additions and 1 deletions
|
@ -237,7 +237,7 @@ (define GiB (expt 2 30))
|
|||
(total (* block-size (file-system-block-count stats)))
|
||||
(relative-threshold-in-bytes (* total (cadr thresholds)))
|
||||
(absolute-threshold-in-bytes (car thresholds)))
|
||||
(when (< available (max relative-threshold-in-bytes
|
||||
(when (< available (min relative-threshold-in-bytes
|
||||
absolute-threshold-in-bytes))
|
||||
(warning (G_ "only ~,1f GiB of free space available on ~a~%")
|
||||
(/ available 1. GiB) (%store-prefix))
|
||||
|
|
Loading…
Reference in a new issue