allow the : to seprate repo name from domain in addresses
This commit is contained in:
parent
920029e627
commit
c0450a5112
|
@ -120,8 +120,18 @@ namespace SparkleShare {
|
|||
public void CloneRepo (object o, EventArgs args) {
|
||||
|
||||
string RepoRemoteUrl = RemoteUrlCombo.Entry.Text;
|
||||
string RepoName =
|
||||
RepoRemoteUrl.Substring (RepoRemoteUrl.LastIndexOf ("/") + 1);
|
||||
|
||||
// Check wheter a "/" or ":" is used to separate the
|
||||
// repo name from the domain.
|
||||
|
||||
int SlashPos = RepoRemoteUrl.LastIndexOf ("/");
|
||||
int ColumnPos = RepoRemoteUrl.LastIndexOf (":");
|
||||
|
||||
string RepoName;
|
||||
if (SlashPos > ColumnPos)
|
||||
RepoName = RepoRemoteUrl.Substring (SlashPos + 1);
|
||||
else
|
||||
RepoName = RepoRemoteUrl.Substring (ColumnPos + 1);
|
||||
|
||||
Process Process = new Process();
|
||||
Process.EnableRaisingEvents = true;
|
||||
|
|
|
@ -100,7 +100,7 @@ namespace SparkleShare {
|
|||
}
|
||||
|
||||
public static bool IsGitUrl (string Url) {
|
||||
return Regex.Match (Url, @"[a-z]+://(.)+/(.)+").Success;
|
||||
return Regex.Match (Url, @"[a-z]+://(.)+(/|:)(.)+").Success;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue