Merge branch 'PathFix' of https://github.com/brandondahler/SparkleShare
Conflicts: SparkleShare/SparkleControllerBase.cs
This commit is contained in:
commit
0b8416dd1b
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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 ("_", " ");
|
||||
|
|
|
@ -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");
|
||||
|
||||
|
|
Loading…
Reference in a new issue