Skip to content
This repository has been archived by the owner on Feb 2, 2021. It is now read-only.

Commit

Permalink
Bugfix: server wasn't loading pledges at startup
Browse files Browse the repository at this point in the history
  • Loading branch information
mikehearn committed Oct 27, 2014
1 parent 0c3f24b commit 1e885ae
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion common/src/main/java/lighthouse/files/DiskManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ private void onDirectoryChanged(Path path, WatchEvent.Kind<Path> kind) {
synchronized (this) {
Project project = projectsById.get(pledge.getProjectId());
ObservableSet<LHProtos.Pledge> projectPledges = this.getPledgesFor(project);
checkState(projectPledges != null); // Project should be in both sets or neither.
checkNotNull(projectPledges); // Project should be in both sets or neither.
projectPledges.remove(pledge);
}
pledgesByPath.remove(path);
Expand Down Expand Up @@ -247,6 +247,7 @@ private void loadAll() throws IOException {
log.warn("Failed to load project {}", path);
}
// Load pledges from each project path.
loadPledgesFromDirectory(AppDirectory.dir());
for (Path path : pledgePaths) {
if (!Files.isDirectory(path)) continue; // Can be from an old version or deleted by user.
loadPledgesFromDirectory(path);
Expand Down

0 comments on commit 1e885ae

Please sign in to comment.