From 8cc50596e91a9157e20ded816b1866a40e88a30c Mon Sep 17 00:00:00 2001 From: Hylke Bons Date: Sun, 29 Jan 2012 20:33:12 +0000 Subject: [PATCH] controller: fix repo loading --- SparkleLib/Git/SparkleRepoGit.cs | 5 +++-- SparkleLib/SparkleRepoBase.cs | 4 +--- SparkleShare/SparkleControllerBase.cs | 9 +++++---- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/SparkleLib/Git/SparkleRepoGit.cs b/SparkleLib/Git/SparkleRepoGit.cs index d387a01a..fa654c88 100755 --- a/SparkleLib/Git/SparkleRepoGit.cs +++ b/SparkleLib/Git/SparkleRepoGit.cs @@ -26,8 +26,9 @@ namespace SparkleLib { public class SparkleRepoGit : SparkleRepoBase { - public SparkleRepoGit (string path, SparkleBackend backend) : - base (path, backend) { } + public SparkleRepoGit (string path) : base (path) + { + } private string identifier = null; diff --git a/SparkleLib/SparkleRepoBase.cs b/SparkleLib/SparkleRepoBase.cs index 9c626092..2ff71f35 100755 --- a/SparkleLib/SparkleRepoBase.cs +++ b/SparkleLib/SparkleRepoBase.cs @@ -57,7 +57,6 @@ namespace SparkleLib { protected bool is_buffering = false; protected bool server_online = true; - public readonly SparkleBackend Backend; public readonly string LocalPath; public readonly string Name; public readonly Uri Url; @@ -93,13 +92,12 @@ namespace SparkleLib { public event ChangesDetectedEventHandler ChangesDetected; - public SparkleRepoBase (string path, SparkleBackend backend) + public SparkleRepoBase (string path) { LocalPath = path; Name = Path.GetFileName (LocalPath); Url = new Uri (SparkleConfig.DefaultConfig.GetUrlForFolder (Name)); - Backend = backend; this.poll_interval = this.short_interval; SyncStatusChanged += delegate (SyncStatus status) { diff --git a/SparkleShare/SparkleControllerBase.cs b/SparkleShare/SparkleControllerBase.cs index d7c624f4..9be4efd2 100755 --- a/SparkleShare/SparkleControllerBase.cs +++ b/SparkleShare/SparkleControllerBase.cs @@ -574,13 +574,14 @@ namespace SparkleShare { try { repo = (SparkleRepoBase) Activator.CreateInstance ( - Type.GetType ("SparkleLib.SparkleRepo" + backend), - folder_path, - SparkleBackend.DefaultBackend + Type.GetType ("SparkleLib.SparkleRepo" + backend + ", SparkleLib"), + folder_path ); } catch { - SparkleHelpers.DebugInfo ("Controller", "Failed to load backend for " + folder_name); + SparkleHelpers.DebugInfo ("Controller", + "Failed to load \"" + backend + "\" backend for \"" + folder_name + "\""); + return; }