If we're a non-versioned application ignore the version.txt file.
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
//
|
//
|
||||||
// $Id: Application.java,v 1.30 2004/08/10 07:26:19 mdb Exp $
|
// $Id: Application.java,v 1.31 2004/08/10 22:28:17 mdb Exp $
|
||||||
|
|
||||||
package com.threerings.getdown.data;
|
package com.threerings.getdown.data;
|
||||||
|
|
||||||
@@ -137,7 +137,7 @@ public class Application
|
|||||||
{
|
{
|
||||||
if (_targetVersion <= _version) {
|
if (_targetVersion <= _version) {
|
||||||
Log.warning("Requested patch resource for up-to-date or " +
|
Log.warning("Requested patch resource for up-to-date or " +
|
||||||
"non-versioned appliation [cvers=" + _version +
|
"non-versioned application [cvers=" + _version +
|
||||||
", tvers=" + _targetVersion + "].");
|
", tvers=" + _targetVersion + "].");
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
@@ -543,7 +543,9 @@ public class Application
|
|||||||
// start by assuming we are happy with our version
|
// start by assuming we are happy with our version
|
||||||
_targetVersion = _version;
|
_targetVersion = _version;
|
||||||
|
|
||||||
// now read in the contents of the version.txt file (if any)
|
// if we are a versioned application, read in the contents of the
|
||||||
|
// version.txt file
|
||||||
|
if (_version != -1) {
|
||||||
File vfile = getLocalPath(VERSION_FILE);
|
File vfile = getLocalPath(VERSION_FILE);
|
||||||
FileInputStream fin = null;
|
FileInputStream fin = null;
|
||||||
try {
|
try {
|
||||||
@@ -559,6 +561,7 @@ public class Application
|
|||||||
} finally {
|
} finally {
|
||||||
StreamUtil.close(fin);
|
StreamUtil.close(fin);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// finally let the caller know if we need an update
|
// finally let the caller know if we need an update
|
||||||
return _version != _targetVersion;
|
return _version != _targetVersion;
|
||||||
|
|||||||
Reference in New Issue
Block a user