Skip to content

Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance

fix in case of white space in path name

lotus596e6215dc24
diff --git a/source/de/anomic/kelondro/util/FileUtils.java b/source/de/anomic/kelondro/util/FileUtils.java
index 13e21ea49..bfdd15f2a 100644
--- a/source/de/anomic/kelondro/util/FileUtils.java
+++ b/source/de/anomic/kelondro/util/FileUtils.java
@@ -753,7 +753,7 @@ public final class FileUtils {
if (System.getProperties().getProperty("os.name","").toLowerCase().startsWith("windows")) {
// deleting files on windows sometimes does not work with java
try {
- String command = "cmd /C del /F /Q " + p;
+ String command = "cmd /C del /F /Q \"" + p + "\"";
Process r = Runtime.getRuntime().exec(command);
if (r == null) {
Log.logSevere("FileUtils", "cannot execute command: " + command);