diff --git a/SparkleLib/Git/SparkleFetcherGit.cs b/SparkleLib/Git/SparkleFetcherGit.cs index b22aa3e0..216c7b9c 100755 --- a/SparkleLib/Git/SparkleFetcherGit.cs +++ b/SparkleLib/Git/SparkleFetcherGit.cs @@ -78,17 +78,17 @@ namespace SparkleLib.Git { } if (uri.Host.Equals ("gitorious.org") && !uri.Scheme.StartsWith ("http")) { - if (!uri.AbsolutePath.Equals ("/") && - !uri.AbsolutePath.EndsWith (".git")) { + if (!uri.LocalPath.Equals ("/") && + !uri.LocalPath.EndsWith (".git")) { - uri = new Uri ("ssh://git@gitorious.org" + uri.AbsolutePath + ".git"); + uri = new Uri (Path.Combine( "ssh://git@gitorious.org", uri.LocalPath, ".git")); } else { - uri = new Uri ("ssh://git@gitorious.org" + uri.AbsolutePath); + uri = new Uri (Path.Combine ("ssh://git@gitorious.org", uri.LocalPath)); } } else if (uri.Host.Equals ("github.com") && !uri.Scheme.StartsWith ("http")) { - uri = new Uri ("ssh://git@github.com" + uri.AbsolutePath); + uri = new Uri (Path.Combine("ssh://git@github.com", uri.LocalPath)); } else if (uri.Host.Equals ("bitbucket.org") && !uri.Scheme.StartsWith ("http")) { // Nothing really @@ -96,9 +96,9 @@ namespace SparkleLib.Git { } else { if (string.IsNullOrEmpty (uri.UserInfo) && !uri.Scheme.StartsWith ("http")) { if (uri.Port == -1) - uri = new Uri (uri.Scheme + "://storage@" + uri.Host + uri.AbsolutePath); + uri = new Uri (Path.Combine (uri.Scheme + "://storage@" + uri.Host, uri.LocalPath)); else - uri = new Uri (uri.Scheme + "://storage@" + uri.Host + ":" + uri.Port + uri.AbsolutePath); + uri = new Uri (Path.Combine (uri.Scheme + "://storage@" + uri.Host + ":" + uri.Port, uri.LocalPath)); } this.use_git_bin = false; // TODO diff --git a/SparkleLib/SparkleFetcherBase.cs b/SparkleLib/SparkleFetcherBase.cs index 8c2139e2..93afae21 100755 --- a/SparkleLib/SparkleFetcherBase.cs +++ b/SparkleLib/SparkleFetcherBase.cs @@ -165,7 +165,7 @@ namespace SparkleLib { IsActive = false; - bool repo_is_encrypted = (RemoteUrl.AbsolutePath.Contains ("-crypto") || + bool repo_is_encrypted = (RemoteUrl.LocalPath.Contains ("-crypto") || RemoteUrl.Host.Equals ("sparkleshare.net")); Finished (repo_is_encrypted, IsFetchedRepoEmpty, Warnings); @@ -225,7 +225,7 @@ namespace SparkleLib { n + "Have fun! :)" + n; - if (RemoteUrl.AbsolutePath.Contains ("-crypto") || RemoteUrl.Host.Equals ("sparkleshare.net")) + if (RemoteUrl.LocalPath.Contains ("-crypto") || RemoteUrl.Host.Equals ("sparkleshare.net")) text = text.Replace ("a SparkleShare repository", "an encrypted SparkleShare repository"); File.WriteAllText (file_path, text); diff --git a/SparkleShare/SparkleControllerBase.cs b/SparkleShare/SparkleControllerBase.cs index afeaeaf6..6ef6378f 100644 --- a/SparkleShare/SparkleControllerBase.cs +++ b/SparkleShare/SparkleControllerBase.cs @@ -632,7 +632,7 @@ namespace SparkleShare { this.watcher.EnableRaisingEvents = false; this.fetcher.Complete (); - string canonical_name = Path.GetFileName (this.fetcher.RemoteUrl.AbsolutePath); + string canonical_name = Path.GetFileName (this.fetcher.RemoteUrl.LocalPath); canonical_name = canonical_name.Replace ("-crypto", ""); canonical_name = canonical_name.Replace ("_", " "); diff --git a/SparkleShare/SparkleSetupController.cs b/SparkleShare/SparkleSetupController.cs index 9c77ffe1..611f2185 100755 --- a/SparkleShare/SparkleSetupController.cs +++ b/SparkleShare/SparkleSetupController.cs @@ -392,7 +392,7 @@ namespace SparkleShare { Uri uri = new Uri (remote_url); try { - string address = remote_url.Replace (uri.AbsolutePath, ""); + string address = uri.ToString ().Replace (uri.LocalPath, ""); new_plugin = SparklePlugin.Create (uri.Host, address, address, "", "", "/path/to/project");