Check for file existence.

git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2784 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Michael Bayne
2003-08-20 03:52:36 +00:00
parent a34e6a7fd8
commit 026be0505a
2 changed files with 16 additions and 9 deletions
@@ -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 + "].");
}
}
}