From 7f868ca3c2041535f1b075840e8966e7763cfa37 Mon Sep 17 00:00:00 2001 From: lotus Date: Thu, 2 Jul 2009 10:02:20 +0000 Subject: [PATCH] resource observer: support for yacyroot\DATA on an NTFS hardlink (Windows) git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@6162 6c8d7289-2bf4-0310-a012-ef5d649a1542 --- source/de/anomic/tools/diskUsage.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/source/de/anomic/tools/diskUsage.java b/source/de/anomic/tools/diskUsage.java index ec179e0e8..44ccce238 100644 --- a/source/de/anomic/tools/diskUsage.java +++ b/source/de/anomic/tools/diskUsage.java @@ -303,7 +303,7 @@ public class diskUsage { } if (path.length() < 6) return; - yacyUsedVolumes.add(path.substring(0, 1)); + yacyUsedVolumes.add(path); } private static HashMap dfWindows() { @@ -313,7 +313,7 @@ public class diskUsage { processArgs.add(windowsCommand); processArgs.add("/c"); processArgs.add("dir"); - processArgs.add(yacyUsedVolumes.get(i) + ":\\"); + processArgs.add("\"" + yacyUsedVolumes.get(i) + "\""); try { final List lines = consoleInterface.getConsoleOutput(processArgs, log); @@ -376,6 +376,10 @@ public class diskUsage { } private static void checkPathUsageWindows(final String path) { + // we would need to ask every path by "dir" as asking the root is not hardlink-proof: + // yacyUsedVolumes.add(path); + return; + /* int index = -1; final String sub = path.substring(0, 1); // ?? nur ein character? try { @@ -386,6 +390,7 @@ public class diskUsage { } if (index < 0) yacyUsedVolumes.add(sub); + */ } }