From e2be44cf1c85df99d6016cb965cd88ea7931d13c Mon Sep 17 00:00:00 2001 From: Doug MacEachern Date: Sat, 11 Dec 2004 21:11:41 +0000 Subject: [PATCH] windows fix --- .../src/net/hyperic/sigar/test/TestFileSystem.java | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/bindings/java/src/net/hyperic/sigar/test/TestFileSystem.java b/bindings/java/src/net/hyperic/sigar/test/TestFileSystem.java index c5304d53..e49975d0 100644 --- a/bindings/java/src/net/hyperic/sigar/test/TestFileSystem.java +++ b/bindings/java/src/net/hyperic/sigar/test/TestFileSystem.java @@ -31,8 +31,17 @@ public class TestFileSystem extends SigarTestCase { assertLengthTrace("TypeName", fs.getTypeName()); assertLengthTrace("SysTypeName", fs.getSysTypeName()); - FileSystemUsage usage = - sigar.getFileSystemUsage(fs.getDirName()); + FileSystemUsage usage; + + try { + usage = sigar.getFileSystemUsage(fs.getDirName()); + } catch (SigarException e) { + if (fs.getType() == FileSystem.TYPE_LOCAL_DISK) { + throw e; + } + //else ok, e.g. floppy drive on windows + continue; + } switch (fs.getType()) { case FileSystem.TYPE_LOCAL_DISK: