Check whether logs dir exists before cleaning

This commit is contained in:
crschnick 2024-01-18 20:54:32 +00:00
parent f33db9ca49
commit acca222a06

View file

@ -98,7 +98,7 @@ public class AppLogs {
public static void init() {
var logDir = AppProperties.get().getDataDir().resolve("logs");
if (XPipeSession.get().isNewBuildSession()) {
if (XPipeSession.get().isNewBuildSession() && Files.exists(logDir)) {
try {
FileUtils.cleanDirectory(logDir.toFile());
} catch (Exception ex) {