summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--src/StatFS.hsc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/StatFS.hsc b/src/StatFS.hsc
index d007d08..e1cb89c 100644
--- a/src/StatFS.hsc
+++ b/src/StatFS.hsc
@@ -79,5 +79,5 @@ getFileSystemStats path =
, fsStatByteCount = toI bcount * bpb
, fsStatBytesFree = toI bfree * bpb
, fsStatBytesAvailable = toI bavail * bpb
- , fsStatBytesUsed = toI (bcount - bavail) * bpb
+ , fsStatBytesUsed = toI (max 0 (bcount - bavail)) * bpb
}