diff --git a/src/java/com/threerings/resource/ResourceManager.java b/src/java/com/threerings/resource/ResourceManager.java index a85d0c8c..04097392 100644 --- a/src/java/com/threerings/resource/ResourceManager.java +++ b/src/java/com/threerings/resource/ResourceManager.java @@ -321,6 +321,35 @@ public class ResourceManager } } + /** + * (Re)initializes the directory to search for resource files. + * + * @param resourceDir the directory path, or null to set the resource dir to + * the value of the resource_dir system property. + */ + public void initResourceDir (String resourceDir) + { + // if none was specified, check the resource_dir system property + if (resourceDir == null) { + try { + resourceDir = System.getProperty("resource_dir"); + } catch (SecurityException se) { + // no problem + } + } + + // if we found no resource directory, don't use one + if (resourceDir == null) { + return; + } + + // make sure there's a trailing slash + if (!resourceDir.endsWith(File.separator)) { + resourceDir += File.separator; + } + _rdir = new File(resourceDir); + } + /** * Given a path relative to the resource directory, the path is properly jimmied (assuming we * always use /) and combined with the resource directory to yield a {@link File} object that @@ -665,29 +694,6 @@ public class ResourceManager { return null; } - - protected void initResourceDir (String resourceDir) - { - // if none was specified, check the resource_dir system property - if (resourceDir == null) { - try { - resourceDir = System.getProperty("resource_dir"); - } catch (SecurityException se) { - // no problem - } - } - - // if we found no resource directory, don't use one - if (resourceDir == null) { - return; - } - - // make sure there's a trailing slash - if (!resourceDir.endsWith(File.separator)) { - resourceDir += File.separator; - } - _rdir = new File(resourceDir); - } /** * Loads up a resource set based on the supplied definition information.