mirror of
https://github.com/xpipe-io/xpipe.git
synced 2026-09-27 02:45:36 +00:00
Check whether logs dir exists before cleaning
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user