mirror of
https://github.com/aluxnimm/outlookcaldavsynchronizer.git
synced 2025-10-06 00:12:52 +02:00
Ignore xml Exceptions during Autodiscovery (needed for some wrong owncloud server paths) and try hostname without path too if well-known not available, fixes autodiscovery for posteo (https://posteo.de:8443)
Display if no resources were found via well-known URLs
This commit is contained in:
@@ -102,7 +102,7 @@ namespace CalDavSynchronizer.DataAccess
|
||||
}
|
||||
catch (Exception x)
|
||||
{
|
||||
if (x.Message.Contains ("404") || x.Message.Contains ("405"))
|
||||
if (x.Message.Contains ("404") || x.Message.Contains ("405") || x is XmlException)
|
||||
return new List<Tuple<Uri, string, string>>();
|
||||
else
|
||||
throw;
|
||||
|
@@ -90,7 +90,7 @@ namespace CalDavSynchronizer.DataAccess
|
||||
}
|
||||
catch (Exception x)
|
||||
{
|
||||
if (x.Message.Contains ("404") || x.Message.Contains ("405"))
|
||||
if (x.Message.Contains ("404") || x.Message.Contains ("405") || x is XmlException)
|
||||
return new List<Tuple<Uri, string>>();
|
||||
else
|
||||
throw;
|
||||
|
@@ -210,7 +210,7 @@ namespace CalDavSynchronizer.Ui
|
||||
}
|
||||
else
|
||||
{
|
||||
MessageBox.Show ("No resources were found via autodiscovery!", OptionTasks.ConnectionTestCaption);
|
||||
MessageBox.Show (useWellKnownCalDav ? "No resources were found via well-known URLs!" : "No resources were found via autodiscovery!", OptionTasks.ConnectionTestCaption);
|
||||
return new AutoDiscoveryResult (null, false, ResourceType.None);
|
||||
}
|
||||
}
|
||||
|
@@ -117,9 +117,9 @@ namespace CalDavSynchronizer.Ui
|
||||
autoDiscoveredUrl = autodiscoveryResult.RessourceUrl;
|
||||
autoDiscoveredResourceType = autodiscoveryResult.ResourceType;
|
||||
}
|
||||
else if (!enteredUri.AbsolutePath.EndsWith ("/"))
|
||||
else
|
||||
{
|
||||
var autodiscoveryResult2 = await OptionTasks.DoAutoDiscovery (new Uri (enteredUri.ToString () + "/"), webDavClient, false, false, _dependencies.OutlookFolderType);
|
||||
var autodiscoveryResult2 = await OptionTasks.DoAutoDiscovery (enteredUri.AbsolutePath.EndsWith ("/") ? enteredUri : new Uri (enteredUri.ToString () + "/"), webDavClient, false, false, _dependencies.OutlookFolderType);
|
||||
if (autodiscoveryResult2.WasCancelled)
|
||||
return;
|
||||
if (autodiscoveryResult2.RessourceUrl != null)
|
||||
@@ -130,8 +130,6 @@ namespace CalDavSynchronizer.Ui
|
||||
else
|
||||
return;
|
||||
}
|
||||
else
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Reference in New Issue
Block a user