mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-12 10:49:06 +01:00
Use commons-io to measure free space.
This commit is contained in:
@@ -55,7 +55,8 @@ class H2Database extends JdbcDatabase {
|
||||
public long getFreeSpace() throws DbException {
|
||||
try {
|
||||
File dir = home.getParentFile();
|
||||
long free = FileSystemUtils.freeSpaceKb(dir.getAbsolutePath());
|
||||
String path = dir.getAbsolutePath();
|
||||
long free = FileSystemUtils.freeSpaceKb(path) * 1024L;
|
||||
long used = getDiskSpace(dir);
|
||||
long quota = maxSize - used;
|
||||
long min = Math.min(free, quota);
|
||||
|
||||
Reference in New Issue
Block a user