fetcher: let the backend handle the parsing of the url. #1118
This commit is contained in:
parent
408bb07a8d
commit
af768393bb
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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),
|
||||
|
|
Loading…
Reference in a new issue