disk space monitor was not working.

git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@5116 71c3de6d-444a-0410-be80-ed276b4c234a
This commit is contained in:
kohsuke committed 2007-10-05 16:19:56 +00:00
1 parent c9c0c36097
commit 2aeeb2cfcf
1 file changed
+8 -5
@@ -46,11 +46,7 @@ public class DiskSpaceMonitor extends NodeMonitor {
FilePath p = c.getNode().getRootPath();
if(p==null) return null;
return p.act(new FileCallable<Long>() {
public Long invoke(File f, VirtualChannel channel) throws IOException {
return f.getUsableSpace();
}
});
return p.act(new GetUsableSpace());
}
public String getDisplayName() {
@@ -61,4 +57,11 @@ public class DiskSpaceMonitor extends NodeMonitor {
return new DiskSpaceMonitor();
}
};
private static final class GetUsableSpace implements FileCallable<Long> {
public Long invoke(File f, VirtualChannel channel) throws IOException {
return f.getUsableSpace();
}
private static final long serialVersionUID = 1L;
}
}