Skip to content

Commit

Permalink
Fixes thrown error when skull skin cache doesnt exist (#4082)
Browse files Browse the repository at this point in the history
  • Loading branch information
onebeastchris authored Aug 29, 2023
1 parent 35a8e15 commit ec5a201
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,11 @@ public static void cacheSkullSkin(String skinHash) throws IOException {
}

public static void cleanSkullSkinCache() {
// No need to clean up if skin cache does not exist
if (!Files.exists(SKULL_SKIN_CACHE_PATH)) {
return;
}

try (Stream<Path> stream = Files.list(SKULL_SKIN_CACHE_PATH)) {
int removeCount = 0;
for (Path path : stream.toList()) {
Expand Down

0 comments on commit ec5a201

Please sign in to comment.