diff --git a/src/java/com/threerings/resource/JNLPDownloader.java b/src/java/com/threerings/resource/JNLPDownloader.java index 1d42e4498..12ed10afd 100644 --- a/src/java/com/threerings/resource/JNLPDownloader.java +++ b/src/java/com/threerings/resource/JNLPDownloader.java @@ -1,5 +1,5 @@ // -// $Id: JNLPDownloader.java,v 1.6 2003/08/09 05:27:07 mdb Exp $ +// $Id: JNLPDownloader.java,v 1.7 2003/08/20 03:52:36 mdb Exp $ package com.threerings.resource; @@ -41,12 +41,14 @@ public class JNLPDownloader extends Downloader // determine which version we already have, if any _vfile = new File(FileUtil.resuffix(_desc.destFile, ".jar", ".vers")); - try { - BufferedReader vin = new BufferedReader(new FileReader(_vfile)); - _cvers = vin.readLine(); - } catch (IOException ioe) { - Log.warning("Error reading version file [path=" + _vfile + - ", error=" + ioe + "]."); + if (_vfile.exists()) { + try { + BufferedReader vin = new BufferedReader(new FileReader(_vfile)); + _cvers = vin.readLine(); + } catch (IOException ioe) { + Log.warning("Error reading version file [path=" + _vfile + + ", error=" + ioe + "]."); + } } } diff --git a/src/java/com/threerings/resource/ResourceBundle.java b/src/java/com/threerings/resource/ResourceBundle.java index 54448c130..9f9662769 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.22 2003/08/15 23:58:02 mdb Exp $ +// $Id: ResourceBundle.java,v 1.23 2003/08/20 03:52:36 mdb Exp $ package com.threerings.resource; @@ -353,6 +353,11 @@ public class ResourceBundle return true; } + if (!_source.exists()) { + throw new IOException("Missing jar file for resource bundle: " + + _source + "."); + } + try { if (_jarSource == null) { _jarSource = new JarFile(_source); @@ -360,7 +365,7 @@ public class ResourceBundle return false; } catch (IOException ioe) { - Log.warning("Failure creating jar file '" + _source + "'."); + Log.warning("Failure reading jar file '" + _source + "'."); Log.logStackTrace(ioe); throw new NestableIOException( "Failed to resolve resource bundle jar file '" +