diff --git a/src/java/com/threerings/resource/ResourceBundle.java b/src/java/com/threerings/resource/ResourceBundle.java index 1db265ab8..2803b2f94 100644 --- a/src/java/com/threerings/resource/ResourceBundle.java +++ b/src/java/com/threerings/resource/ResourceBundle.java @@ -1,5 +1,5 @@ // -// $Id: ResourceBundle.java,v 1.12 2003/04/28 18:21:47 mdb Exp $ +// $Id: ResourceBundle.java,v 1.13 2003/05/05 18:02:37 mdb Exp $ package com.threerings.resource; @@ -15,6 +15,7 @@ import java.util.jar.JarEntry; import java.util.jar.JarFile; import com.samskivert.io.NestableIOException; +import com.samskivert.util.FileUtil; import com.samskivert.util.StringUtil; import org.apache.commons.io.StreamUtils; @@ -238,5 +239,13 @@ public class ResourceBundle Log.info("Creating narya temp cache directory '" + _tmpdir + "'."); _tmpdir.mkdirs(); } + + // add a hook to blow away the temp directory when we exit + Runtime.getRuntime().addShutdownHook(new Thread() { + public void run () { + Log.info("Clearing narya temp cache '" + _tmpdir + "'."); + FileUtil.recursiveDelete(_tmpdir); + } + }); } } diff --git a/src/java/com/threerings/resource/ResourceManager.java b/src/java/com/threerings/resource/ResourceManager.java index c43411290..f7f19845c 100644 --- a/src/java/com/threerings/resource/ResourceManager.java +++ b/src/java/com/threerings/resource/ResourceManager.java @@ -1,5 +1,5 @@ // -// $Id: ResourceManager.java,v 1.27 2003/05/03 00:51:13 ray Exp $ +// $Id: ResourceManager.java,v 1.28 2003/05/05 18:02:37 mdb Exp $ package com.threerings.resource; @@ -27,7 +27,6 @@ import javax.imageio.stream.FileImageInputStream; import javax.imageio.stream.ImageInputStream; import javax.imageio.stream.MemoryCacheImageInputStream; -import com.samskivert.util.FileUtil; import com.samskivert.util.StringUtil; import com.threerings.resource.DownloadManager.DownloadDescriptor; @@ -172,16 +171,6 @@ public class ResourceManager "won't be able to create our cache directory " + "either. [error=" + se + "]."); } - - // Add a hook to blow away the temp directory when we exit - Runtime.getRuntime().addShutdownHook(new Thread() { - public void run () - { - File dir = ResourceBundle.getCacheDir(); - Log.info("Deleting narya temp cache directory '" + dir + "'."); - FileUtil.recursiveDelete(dir); - } - }); } /**