Skip to content

Commit

Permalink
-
Browse files Browse the repository at this point in the history
  • Loading branch information
pron committed Aug 31, 2015
1 parent 8c90f5e commit c6d636a
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions capsule/src/main/java/Capsule.java
Expand Up @@ -2091,10 +2091,8 @@ private void lockAppCache(Path dir) throws IOException {
final FileChannel c = FileChannel.open(lockFile, new HashSet<>(asList(StandardOpenOption.CREATE, StandardOpenOption.WRITE)), getPermissions(dir));

if (this.appCacheLock != null) {
// This shouldn't happen, but due to another bug it's possible that the cache was locked and
// not released. In this case, attempting to lock again would throw an OverlappingFileLockException,
// which is not a very user-friendly solution. Instead, we just log a warning message and attempt to
// continue running.
// This shouldn't happen, but due to some other bug it's possible that the cache was locked and not released.
// In this case, attempting to lock again would throw an OverlappingFileLockException and may obscure the real problem.
log(LOG_QUIET, "Attempting to double lock (ignoring, but this is most likely a bug in CAPSULE)");
c.close();
} else {
Expand Down

0 comments on commit c6d636a

Please sign in to comment.