From ba26e551bdb9fdc877f8821d6e84b1c7477ab85c Mon Sep 17 00:00:00 2001 From: Michael Bayne Date: Mon, 27 Oct 2003 11:43:26 +0000 Subject: [PATCH] Differentiate between dynamic resource URLs. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2842 542714f4-19e9-0310-aa3c-eee0fc999fb1 --- .../com/threerings/resource/ResourceManager.java | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/java/com/threerings/resource/ResourceManager.java b/src/java/com/threerings/resource/ResourceManager.java index c352f1a1e..6890e07cc 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.36 2003/09/24 23:54:59 mdb Exp $ +// $Id: ResourceManager.java,v 1.37 2003/10/27 11:43:26 mdb Exp $ package com.threerings.resource; @@ -352,7 +352,7 @@ public class ResourceManager */ public boolean checkDynamicBundle (String path) { - return createResourceBundle(DYNAMIC_BUNDLE_SET, path).isUnpacked(); + return createResourceBundle(_dnset, path).isUnpacked(); } /** @@ -370,8 +370,10 @@ public class ResourceManager return; } - final ResourceBundle bundle = createResourceBundle( - DYNAMIC_BUNDLE_SET, path); + // note our dynamic bundle set + _dnset = DYNAMIC_BUNDLE_SET + StringUtil.md5hex(_drurl.toString()); + + final ResourceBundle bundle = createResourceBundle(_dnset, path); if (bundle.isUnpacked()) { if (bundle.sourceIsReady()) { listener.requestCompleted(bundle); @@ -860,6 +862,10 @@ public class ResourceManager /** The url via which we download our dynamically generated bundles. */ protected URL _drurl; + /** The resource set we use for dynamic resources from a particular + * dynamic bundle URL. */ + protected String _dnset; + /** The prefix we prepend to resource paths before attempting to load * them from the classpath. */ protected String _rootPath;