jdk/test/demo/zipfs/ZipFSTester.java
changeset 7189 5749df30059b
parent 6699 d8229570529d
child 7531 77870839c857
--- a/jdk/test/demo/zipfs/ZipFSTester.java	Mon Nov 15 15:11:04 2010 +0000
+++ b/jdk/test/demo/zipfs/ZipFSTester.java	Mon Nov 15 09:26:49 2010 -0800
@@ -64,7 +64,6 @@
         fs0.close();                // sync to file
 
         fs = newZipFileSystem(tmpfsPath, new HashMap<String, Object>());
-
         try {
             // prepare a src
             Path src = getTempPath();
@@ -146,13 +145,6 @@
         Path fs2Path = getTempPath();
         Path fs3Path = getTempPath();
 
-        if (fs1Path.exists())
-            fs1Path.delete();
-        if (fs2Path.exists())
-            fs2Path.delete();
-        if (fs3Path.exists())
-            fs3Path.delete();
-
         // create a new filesystem, copy everything from fs
         Map<String, Object> env = new HashMap<String, Object>();
         env.put("createNew", true);
@@ -280,7 +272,6 @@
         walk(fs4.getPath("/"));
         System.out.println("closing: fs4");
         fs4.close();
-
         System.out.printf("failed=%d%n", failed);
 
         fs1Path.delete();
@@ -426,6 +417,8 @@
     }
 
     private static void mkdirs(Path path) throws IOException {
+        if (path.exists())
+            return;
         path = path.toAbsolutePath();
         Path parent = path.getParent();
         if (parent != null) {