Revert "fix handling of paths to be able to clone a github repo (#7)"
This reverts commit 590b8e3a38
.
This is fixed slightly different in the winforms branch, so
want to revert it for a clean merge.
This commit is contained in:
parent
590b8e3a38
commit
55f56c7937
|
@ -964,8 +964,7 @@ namespace SparkleShare {
|
||||||
Directory.CreateDirectory (SparklePaths.SparkleTmpPath);
|
Directory.CreateDirectory (SparklePaths.SparkleTmpPath);
|
||||||
|
|
||||||
// Strip the '.git' from the name
|
// Strip the '.git' from the name
|
||||||
string canonical_name = Regex.Replace (remote_folder, @"\..*$", "");
|
string canonical_name = Path.GetFileNameWithoutExtension (remote_folder);
|
||||||
canonical_name = Regex.Replace (remote_folder, @"^.*/", "");
|
|
||||||
string tmp_folder = Path.Combine (SparklePaths.SparkleTmpPath, canonical_name);
|
string tmp_folder = Path.Combine (SparklePaths.SparkleTmpPath, canonical_name);
|
||||||
|
|
||||||
SparkleFetcherBase fetcher = null;
|
SparkleFetcherBase fetcher = null;
|
||||||
|
@ -1010,7 +1009,7 @@ namespace SparkleShare {
|
||||||
try {
|
try {
|
||||||
Directory.Move (tmp_folder, target_folder_path);
|
Directory.Move (tmp_folder, target_folder_path);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
SparkleHelpers.DebugInfo ("Controller", String.Format ("Error moving folder from {0} to {1}: {2}", tmp_folder, target_folder_path, e.Message));
|
SparkleHelpers.DebugInfo ("Controller", "Error moving folder: " + e.Message);
|
||||||
}
|
}
|
||||||
|
|
||||||
SparkleConfig.DefaultConfig.AddFolder (target_folder_name, fetcher.RemoteUrl, backend);
|
SparkleConfig.DefaultConfig.AddFolder (target_folder_name, fetcher.RemoteUrl, backend);
|
||||||
|
|
|
@ -17,7 +17,6 @@
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Text.RegularExpressions;
|
|
||||||
|
|
||||||
namespace SparkleShare {
|
namespace SparkleShare {
|
||||||
|
|
||||||
|
@ -101,7 +100,7 @@ namespace SparkleShare {
|
||||||
|
|
||||||
public void AddPageCompleted (string server, string folder_name)
|
public void AddPageCompleted (string server, string folder_name)
|
||||||
{
|
{
|
||||||
this.syncing_folder = Regex.Replace (folder_name, @"\..*$", "");
|
this.syncing_folder = Path.GetFileNameWithoutExtension (folder_name);
|
||||||
this.previous_server = server;
|
this.previous_server = server;
|
||||||
this.previous_folder = folder_name;
|
this.previous_folder = folder_name;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue