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.
This commit is contained in:
Felix Bergmann 2020-04-07 09:27:28 +02:00 committed by GitHub
parent 3c272a3e31
commit bffabb4a05
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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;
} }