From 2ad238c1ffee6d3e77563efa1dfcc192386eda77 Mon Sep 17 00:00:00 2001 From: Hylke Bons Date: Thu, 13 May 2010 23:44:16 +0100 Subject: [PATCH] fix regex --- SparkleShare/SparkleDialog.cs | 18 +++++++++--------- SparkleShare/SparkleHelpers.cs | 3 +-- 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/SparkleShare/SparkleDialog.cs b/SparkleShare/SparkleDialog.cs index ac882821..2b69c164 100644 --- a/SparkleShare/SparkleDialog.cs +++ b/SparkleShare/SparkleDialog.cs @@ -54,15 +54,15 @@ namespace SparkleShare { Label RemoteUrlLabel = new Label ("Remote address: "); - string [] DefaultUrls = new string [4] { "ssh://git@github.com/", - "ssh://git@git.gnome.org/", - "ssh://git@fedorahosted.org/", - "ssh://git@gitorious.org/" }; + string [] DefaultUrls = new string [4] { "ssh://git@github.com", + "ssh://git@git.gnome.org", + "ssh://git@fedorahosted.org", + "ssh://git@gitorious.org" }; RemoteUrlCombo = new ComboBoxEntry (DefaultUrls); Label RemoteUrlExample = new Label ("Example: " + - "‘ssh://git@github.com/’."); + "‘ssh://git@github.com’."); RemoteUrlExample.UseMarkup = true; RemoteUrlExample.SetAlignment (0, 0); RemoteUrlLabel.Xalign = 1; @@ -129,11 +129,11 @@ namespace SparkleShare { Process.StartInfo.WorkingDirectory = SparklePaths.SparkleTmpPath; - Process.StartInfo.Arguments = "clone " + - RepoRemoteUrl + " " + - RepoName; + Process.StartInfo.Arguments = + "clone " + SparkleHelpers.CombineMore (RepoRemoteUrl, RepoName); + Console.WriteLine (Process.StartInfo.Arguments); - Process.Start (); +// Process.Start (); Process.Exited += delegate { Directory.Move ( SparkleHelpers.CombineMore (SparklePaths.SparkleTmpPath, diff --git a/SparkleShare/SparkleHelpers.cs b/SparkleShare/SparkleHelpers.cs index 0875c587..1ecf8e92 100644 --- a/SparkleShare/SparkleHelpers.cs +++ b/SparkleShare/SparkleHelpers.cs @@ -87,7 +87,6 @@ namespace SparkleShare { return NewPath; } - public static IconTheme SparkleTheme = new IconTheme (); // Looks up an icon from the system's theme @@ -98,7 +97,7 @@ namespace SparkleShare { } public static bool IsGitUrl (string Url) { - return Regex.Match (Url, @"[a-z]+://.+(/|:).+").Success; + return Regex.Match (Url, @"[a-z]+://(.)+").Success; } }