diff --git a/SparkleShare/SparkleControllerBase.cs b/SparkleShare/SparkleControllerBase.cs index 6c8ca830..5e2507e8 100755 --- a/SparkleShare/SparkleControllerBase.cs +++ b/SparkleShare/SparkleControllerBase.cs @@ -155,6 +155,7 @@ namespace SparkleShare { if (invite.Valid) { InviteReceived (invite); + File.Delete (args.FullPath); } else { if (AlertNotificationRaised != null) @@ -162,7 +163,6 @@ namespace SparkleShare { "This invite seems screwed up..."); } - File.Delete (args.FullPath); } } }; diff --git a/SparkleShare/SparkleInvite.cs b/SparkleShare/SparkleInvite.cs index 2a219f78..782fa76a 100644 --- a/SparkleShare/SparkleInvite.cs +++ b/SparkleShare/SparkleInvite.cs @@ -34,8 +34,7 @@ namespace SparkleShare { public bool Valid { get { return (!string.IsNullOrEmpty (Address) && - !string.IsNullOrEmpty (RemotePath) && - !string.IsNullOrEmpty (AcceptUrl.ToString ())); + !string.IsNullOrEmpty (RemotePath)); } } @@ -79,6 +78,9 @@ namespace SparkleShare { public bool Accept () { + if (AcceptUrl == null) + return true; + try { WebRequest request = WebRequest.Create (AcceptUrl); @@ -114,13 +116,7 @@ namespace SparkleShare { private void Initialize (string address, string remote_path, string accept_url) - {/* - if (!remote_path.StartsWith ("/")) - remote_path = "/" + remote_path; - - if (!address.EndsWith ("/")) - address = address + "/"; - */ + { Address = address; RemotePath = remote_path; AcceptUrl = new Uri (accept_url);