浏览代码

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 年之前
父节点
当前提交
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() {
         stop();
 
-        if (this.dataDir.exists() || this.dataDir.isDirectory()) {
+        if (this.dataDir.exists() && this.dataDir.isDirectory()) {
             start();
             return;
         }