Slightly tweaked update check routines.
This commit is contained in:
parent
369a36534a
commit
7dfdd39240
1 changed files with 4 additions and 4 deletions
|
@ -111,7 +111,7 @@ public final class TypeManager {
|
||||||
// if prototype doesn't exist, create it
|
// if prototype doesn't exist, create it
|
||||||
if (proto == null) {
|
if (proto == null) {
|
||||||
// leave out ".." and other directories that contain "."
|
// leave out ".." and other directories that contain "."
|
||||||
if (list[i].isDirectory () && isValidTypeName (filename)) {
|
if (filename.indexOf ('.') < 0 && list[i].isDirectory () && isValidTypeName (filename)) {
|
||||||
// create new prototype
|
// create new prototype
|
||||||
proto = new Prototype (filename, app);
|
proto = new Prototype (filename, app);
|
||||||
registerPrototype (filename, list[i], proto);
|
registerPrototype (filename, list[i], proto);
|
||||||
|
@ -225,13 +225,13 @@ public final class TypeManager {
|
||||||
if (proto == null)
|
if (proto == null)
|
||||||
return;
|
return;
|
||||||
// if prototype has been checked in the last 1.5 seconds, return
|
// if prototype has been checked in the last 1.5 seconds, return
|
||||||
if (System.currentTimeMillis() - proto.getLastCheck() < 1500)
|
// if (System.currentTimeMillis() - proto.getLastCheck() < 2500)
|
||||||
return;
|
// return;
|
||||||
|
|
||||||
synchronized (proto) {
|
synchronized (proto) {
|
||||||
// check again because another thread may have checked the
|
// check again because another thread may have checked the
|
||||||
// prototype while we were waiting for access to the synchronized section
|
// prototype while we were waiting for access to the synchronized section
|
||||||
if (System.currentTimeMillis() - proto.getLastCheck() < 1500)
|
if (System.currentTimeMillis() - proto.getLastCheck() < 1000)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
File dir = new File (appDir, proto.getName());
|
File dir = new File (appDir, proto.getName());
|
||||||
|
|
Loading…
Add table
Reference in a new issue