From 6d2599fc5278382710eef861f4ba20247d5a3953 Mon Sep 17 00:00:00 2001 From: GHelliot <36567899+GHelliot@users.noreply.github.com> Date: Sat, 21 Jan 2023 20:11:36 +0100 Subject: [PATCH] Update Device.vala Changing to available_bytes instead of calculating the free bytes from (size_bytes - used_bytes) respects potential reserved space for "for root only" e.g. on ext4 file systems. It should prevent running out of space in the unfavorable cases having the timeshift archive located on the actual root file system. --- src/Utility/Device.vala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Utility/Device.vala b/src/Utility/Device.vala index dc44b89..2f2e52e 100644 --- a/src/Utility/Device.vala +++ b/src/Utility/Device.vala @@ -119,7 +119,7 @@ public class Device : GLib.Object{ public uint64 free_bytes{ get{ - return (used_bytes == 0) ? 0 : (size_bytes - used_bytes); + return (used_bytes == 0) ? 0 : (available_bytes); } }