Skip to content

Commit

Permalink
Update CacheAPI.java
Browse files Browse the repository at this point in the history
  • Loading branch information
Kamilake authored Jun 11, 2024
1 parent bb41bcc commit cade141
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -120,9 +120,8 @@ public boolean prepare(ILoader bootCore) throws Exception {

@Override
public void start(ILoader bootCore) throws Exception {
if (!dir.exists()) {
if (dir.mkdirs()) throw new IOException("Cannot make necessary dirs for proper storing");
}
if (!dir.exists()) dir.mkdirs();
if (!dir.exists()) throw new IOException("Cannot make necessary dirs for proper storing");
if (index.exists()) {
try (DataInputStream stream = new DataInputStream(new GZIPInputStream(Files.newInputStream(index.toPath())))) {
int length = stream.readInt();
Expand Down Expand Up @@ -169,4 +168,4 @@ public Entry(String url, String tag, long time, long expireTime) {
public long getExpireTime() { return expireTime; }
public File getFile() { return entry$getFile(url); }
}
}
}

0 comments on commit cade141

Please sign in to comment.