fix regex
This commit is contained in:
parent
cc2043b5db
commit
bc55a6ef4a
|
@ -54,15 +54,15 @@ namespace SparkleShare {
|
||||||
|
|
||||||
Label RemoteUrlLabel = new Label ("Remote address: ");
|
Label RemoteUrlLabel = new Label ("Remote address: ");
|
||||||
|
|
||||||
string [] DefaultUrls = new string [4] { "ssh://git@github.com/",
|
string [] DefaultUrls = new string [4] { "ssh://git@github.com",
|
||||||
"ssh://git@git.gnome.org/",
|
"ssh://git@git.gnome.org",
|
||||||
"ssh://git@fedorahosted.org/",
|
"ssh://git@fedorahosted.org",
|
||||||
"ssh://git@gitorious.org/" };
|
"ssh://git@gitorious.org" };
|
||||||
|
|
||||||
RemoteUrlCombo = new ComboBoxEntry (DefaultUrls);
|
RemoteUrlCombo = new ComboBoxEntry (DefaultUrls);
|
||||||
|
|
||||||
Label RemoteUrlExample = new Label ("<span size='small'><i>Example: " +
|
Label RemoteUrlExample = new Label ("<span size='small'><i>Example: " +
|
||||||
"‘ssh://git@github.com/’.</i></span>");
|
"‘ssh://git@github.com’.</i></span>");
|
||||||
RemoteUrlExample.UseMarkup = true;
|
RemoteUrlExample.UseMarkup = true;
|
||||||
RemoteUrlExample.SetAlignment (0, 0);
|
RemoteUrlExample.SetAlignment (0, 0);
|
||||||
RemoteUrlLabel.Xalign = 1;
|
RemoteUrlLabel.Xalign = 1;
|
||||||
|
@ -129,11 +129,11 @@ namespace SparkleShare {
|
||||||
Process.StartInfo.WorkingDirectory =
|
Process.StartInfo.WorkingDirectory =
|
||||||
SparklePaths.SparkleTmpPath;
|
SparklePaths.SparkleTmpPath;
|
||||||
|
|
||||||
Process.StartInfo.Arguments = "clone " +
|
Process.StartInfo.Arguments =
|
||||||
RepoRemoteUrl + " " +
|
"clone " + SparkleHelpers.CombineMore (RepoRemoteUrl, RepoName);
|
||||||
RepoName;
|
Console.WriteLine (Process.StartInfo.Arguments);
|
||||||
|
|
||||||
Process.Start ();
|
// Process.Start ();
|
||||||
Process.Exited += delegate {
|
Process.Exited += delegate {
|
||||||
Directory.Move (
|
Directory.Move (
|
||||||
SparkleHelpers.CombineMore (SparklePaths.SparkleTmpPath,
|
SparkleHelpers.CombineMore (SparklePaths.SparkleTmpPath,
|
||||||
|
|
|
@ -87,7 +87,6 @@ namespace SparkleShare {
|
||||||
return NewPath;
|
return NewPath;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public static IconTheme SparkleTheme = new IconTheme ();
|
public static IconTheme SparkleTheme = new IconTheme ();
|
||||||
|
|
||||||
// Looks up an icon from the system's theme
|
// Looks up an icon from the system's theme
|
||||||
|
@ -98,7 +97,7 @@ namespace SparkleShare {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static bool IsGitUrl (string Url) {
|
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