mirror of
https://github.com/moparisthebest/davmail
synced 2024-12-13 03:02:22 -05:00
Caldav: delete broken events when davmail.deleteBroken is true
git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@1379 3d1905a2-6b24-0410-a738-b14d5a86fcbd
This commit is contained in:
parent
d4a0a3e341
commit
1460328ea9
@ -1978,6 +1978,15 @@ public abstract class ExchangeSession {
|
||||
protected HttpException buildHttpException(Exception e) {
|
||||
String message = "Unable to get event " + getName() + " subject: "+subject+" at " + permanentUrl + ": " + e.getMessage();
|
||||
LOGGER.warn(message);
|
||||
// try to move broken event to trash
|
||||
if (Settings.getBooleanProperty("davmail.deleteBroken")) {
|
||||
LOGGER.warn("Deleting broken event at: " + permanentUrl);
|
||||
try {
|
||||
deleteItem(folderPath, itemName);
|
||||
} catch (IOException ioe) {
|
||||
LOGGER.warn("Unable to delete broken event at: " + permanentUrl);
|
||||
}
|
||||
}
|
||||
return new HttpException(message);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user