We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent cb003bc commit ece36deCopy full SHA for ece36de
mdbxjni/src/main/java/com/castortech/mdbxjni/Env.java
@@ -524,6 +524,11 @@ public Stat stat() {
524
public float percentageFull() {
525
Stat stat2 = stat();
526
EnvInfo info2 = info();
527
+
528
+ if (stat2.ms_psize == 0) {
529
+ return 0.0f;
530
+ }
531
532
long nbrPages = info2.getMapSize() / stat2.ms_psize;
533
return (info2.getLastPgNo() / (float)nbrPages) * 100;
534
}
0 commit comments