aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/main/java/org/traccar/helper/Log.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main/java/org/traccar/helper/Log.java b/src/main/java/org/traccar/helper/Log.java
index 37df6a537..6c6d49550 100644
--- a/src/main/java/org/traccar/helper/Log.java
+++ b/src/main/java/org/traccar/helper/Log.java
@@ -283,8 +283,8 @@ public final class Log {
var stores = new ArrayList<Pair<Long, Long>>();
for (FileStore store : FileSystems.getDefault().getFileStores()) {
try {
- long totalSpace = store.getTotalSpace();
long usableSpace = store.getUsableSpace();
+ long totalSpace = store.getTotalSpace();
if (totalSpace > 1_000_000_000) {
stores.add(new Pair<>(usableSpace, totalSpace));
}
@@ -292,7 +292,7 @@ public final class Log {
}
}
return stores.stream()
- .sorted(Comparator.comparingDouble(o -> 1 - o.getFirst() / (double) o.getSecond()))
+ .sorted(Comparator.comparingDouble(p -> p.getFirst() / (double) p.getSecond()))
.flatMap(p -> Stream.of(p.getFirst(), p.getSecond()))
.mapToLong(Long::longValue)
.toArray();