From 075bf5ad4011542fc253bebe796bb5c22631c15f Mon Sep 17 00:00:00 2001 From: Andrea Cavalli Date: Sat, 16 Jan 2021 00:30:45 +0100 Subject: [PATCH] Don't delete missing files --- src/main/java/it/tdlight/tdlibsession/td/easy/AsyncTdEasy.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main/java/it/tdlight/tdlibsession/td/easy/AsyncTdEasy.java b/src/main/java/it/tdlight/tdlibsession/td/easy/AsyncTdEasy.java index fe9fca4..7691fc0 100644 --- a/src/main/java/it/tdlight/tdlibsession/td/easy/AsyncTdEasy.java +++ b/src/main/java/it/tdlight/tdlibsession/td/easy/AsyncTdEasy.java @@ -562,6 +562,9 @@ public class AsyncTdEasy { sessionPath.resolve("thumbnails"), sessionPath.resolve("wallpapers") )) + .filterWhen(file -> Mono + .fromCallable(() -> Files.exists(file)) + .subscribeOn(Schedulers.boundedElastic())) .doOnNext(directory -> { try { if (!Files.walk(directory)