[AB-93] changing how MessageToSend handles attached plaintext files

This commit is contained in:
Sheldan
2023-05-18 22:32:56 +02:00
parent ca530949c6
commit 3df688571f
9 changed files with 64 additions and 155 deletions

View File

@@ -36,4 +36,12 @@ public class FileService {
public void safeDelete(File file) throws IOException {
java.nio.file.Files.delete(file.toPath());
}
public void safeDeleteIgnoreException(File file) {
try {
Files.delete(file.toPath());
} catch (IOException e) {
log.warn("Failed to delete file - ignoring.", e);
}
}
}