Browse Source

Fix BlockStoreConversion bug on folder check

If dataDir.exists() is true, dataDir.isDirectory() will always also be true. You probably wanted to check whether it is a folder.
This bug could lead to a critical bug when a file with the name of the folder exists.
Felix Bergmann 5 years ago
parent
commit
bffabb4a05

+ 1 - 1
src/main/java/com/gmail/nossr50/util/blockmeta/conversion/BlockStoreConversionMain.java

@@ -75,7 +75,7 @@ public class BlockStoreConversionMain implements Runnable {
     public void softStop() {
     public void softStop() {
         stop();
         stop();
 
 
-        if (this.dataDir.exists() || this.dataDir.isDirectory()) {
+        if (this.dataDir.exists() && this.dataDir.isDirectory()) {
             start();
             start();
             return;
             return;
         }
         }