Skip to content

Commit

Permalink
Update Device.vala
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
GHelliot authored and mtwebster committed Feb 2, 2023
1 parent d29a7ab commit 6d2599f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Utility/Device.vala
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}

Expand Down

0 comments on commit 6d2599f

Please sign in to comment.