mirror of
https://github.com/xpipe-io/xpipe.git
synced 2024-11-25 09:00:26 +00:00
Check whether logs dir exists before cleaning
This commit is contained in:
parent
f33db9ca49
commit
acca222a06
1 changed files with 1 additions and 1 deletions
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue