Skip to content

Commit

Permalink
0003250 more efficient version of fix
Browse files Browse the repository at this point in the history
  • Loading branch information
chenson42 committed Sep 25, 2017
1 parent 36a9c43 commit b4ea476
Showing 1 changed file with 9 additions and 4 deletions.
Expand Up @@ -182,10 +182,15 @@ public IStagedResource find(String path) {
if (resource == null) {
boolean foundResourcePath = resourcePaths.contains(path);
if (!foundResourcePath && clusterEnabled) {
refreshResourceList();
foundResourcePath = resourcePaths.contains(path);
}
if (foundResourcePath) {
synchronized (this) {
StagedResource staged = new StagedResource(directory, path, this);
if (staged.exists() && staged.getState() == State.DONE) {
resourcePaths.add(path);
resource = staged;
foundResourcePath = true;
}
}
} else if (foundResourcePath) {
resource = new StagedResource(directory, path, this);
}
}
Expand Down

0 comments on commit b4ea476

Please sign in to comment.