Skip to content

Commit

Permalink
GG-17345 Checking file length in FilePageStore#exists()
Browse files Browse the repository at this point in the history
  • Loading branch information
denis-chudov committed Jul 16, 2019
1 parent 2a1dcf5 commit 0a17bb9
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,9 @@ public FilePageStore(

/** {@inheritDoc} */
@Override public boolean exists() {
return Files.exists(pathProvider.apply());
File file = pathProvider.apply().toFile();

return file.exists() && file.length() > headerSize();
}

/**
Expand Down

0 comments on commit 0a17bb9

Please sign in to comment.