Skip to content

Commit 135351d

Browse files
authored
check if cache exists before cleaning (#326)
1 parent f46e2fb commit 135351d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/com/cleanroommc/groovyscript/sandbox/CustomGroovyScriptEngine.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ public boolean deleteScriptCache() {
171171
this.loadedClasses.clear();
172172
getClassLoader().clearCache();
173173
try {
174-
FileUtils.cleanDirectory(this.cacheRoot);
174+
if (this.cacheRoot.exists()) FileUtils.cleanDirectory(this.cacheRoot);
175175
return true;
176176
} catch (IOException e) {
177177
GroovyScript.LOGGER.throwing(e);

0 commit comments

Comments
 (0)