[intro] be more forgiving towards entered urls
This commit is contained in:
parent
fca6242121
commit
ed32030a45
|
@ -328,6 +328,12 @@ namespace SparkleShare {
|
||||||
|
|
||||||
AddButton.Clicked += delegate {
|
AddButton.Clicked += delegate {
|
||||||
|
|
||||||
|
string name = FolderEntry.Text;
|
||||||
|
|
||||||
|
// Remove the starting slash if there is one
|
||||||
|
if (name.StartsWith ("/"))
|
||||||
|
name = name.Substring (1);
|
||||||
|
|
||||||
string server = "";
|
string server = "";
|
||||||
|
|
||||||
if (radio_button.Active) {
|
if (radio_button.Active) {
|
||||||
|
@ -349,12 +355,8 @@ namespace SparkleShare {
|
||||||
if (radio_button_gnome.Active)
|
if (radio_button_gnome.Active)
|
||||||
server = "ssh://git@gnome.org";
|
server = "ssh://git@gnome.org";
|
||||||
|
|
||||||
|
if (!name.EndsWith (".git"))
|
||||||
string name = FolderEntry.Text;
|
name += ".git";
|
||||||
|
|
||||||
// Remove the starting slash if there is one
|
|
||||||
if (name.StartsWith ("/"))
|
|
||||||
name = name.Substring (1);
|
|
||||||
|
|
||||||
string canonical_name = System.IO.Path.GetFileNameWithoutExtension (name);
|
string canonical_name = System.IO.Path.GetFileNameWithoutExtension (name);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue