fetcher: let the backend handle the parsing of the url. #1118

This commit is contained in:
Hylke Bons 2012-12-19 21:01:55 +01:00
parent 408bb07a8d
commit af768393bb
2 changed files with 4 additions and 3 deletions

View file

@ -107,6 +107,10 @@ namespace SparkleLib {
server = "ssh://" + server;
TargetFolder = target_folder;
if (server.StartsWith ("ssh+"))
server = "ssh" + server.Substring (address.IndexOf ("://"));
RemoteUrl = new Uri (server + remote_path);
IsActive = false;
}

View file

@ -551,9 +551,6 @@ namespace SparkleShare {
string tmp_folder = Path.Combine (tmp_path, canonical_name);
string backend = SparkleFetcherBase.GetBackend (address);
if (address.StartsWith ("ssh+"))
address = "ssh" + address.Substring (address.IndexOf ("://"));
try {
this.fetcher = (SparkleFetcherBase) Activator.CreateInstance (
Type.GetType ("SparkleLib." + backend + ".SparkleFetcher, SparkleLib." + backend),