From 105812725cd9041c5d94c102f2147005765d7b91 Mon Sep 17 00:00:00 2001 From: Michael Bayne Date: Fri, 15 Mar 2002 02:18:18 +0000 Subject: [PATCH] Allow the specification of the directory in which the resource manager caches bundle files. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1123 542714f4-19e9-0310-aa3c-eee0fc999fb1 --- .../com/threerings/resource/ResourceManager.java | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/java/com/threerings/resource/ResourceManager.java b/src/java/com/threerings/resource/ResourceManager.java index aa9b5a362..78650816d 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.9 2002/02/26 05:28:02 mdb Exp $ +// $Id: ResourceManager.java,v 1.10 2002/03/15 02:18:18 mdb Exp $ package com.threerings.resource; @@ -196,9 +196,14 @@ public class ResourceManager // already have it if (_cachePath == null) { try { - String dir = System.getProperty("user.home"); - _cachePath = (dir + File.separator + - CACHE_PATH + File.separator); + // first check for an explicitly specified cache directory + String dir = System.getProperty("rsrc_cache_dir"); + // if that's null, try putting it into their home directory + if (dir == null) { + dir = System.getProperty("user.home") + + File.separator + CACHE_PATH; + } + _cachePath = (dir + File.separator); } catch (SecurityException se) { Log.info("Can't obtain user.home system property. Probably " + "won't be able to create our cache directory " +