diff --git a/Duplicati/CommandLine/RecoveryTool/Duplicati.CommandLine.RecoveryTool.csproj b/Duplicati/CommandLine/RecoveryTool/Duplicati.CommandLine.RecoveryTool.csproj index 6a21e8313..53796323f 100644 --- a/Duplicati/CommandLine/RecoveryTool/Duplicati.CommandLine.RecoveryTool.csproj +++ b/Duplicati/CommandLine/RecoveryTool/Duplicati.CommandLine.RecoveryTool.csproj @@ -171,6 +171,10 @@ {B20A7CEE-9C5B-47B9-8B76-BC85ADFE8493} Duplicati.Library.Backend.Dropbox + + {D63E53E4-A458-4C2F-914D-92F715F58ACF} + Duplicati.Library.IO + diff --git a/Duplicati/CommandLine/RecoveryTool/Restore.cs b/Duplicati/CommandLine/RecoveryTool/Restore.cs index c74167200..de966c415 100644 --- a/Duplicati/CommandLine/RecoveryTool/Restore.cs +++ b/Duplicati/CommandLine/RecoveryTool/Restore.cs @@ -18,7 +18,8 @@ using System; using System.IO; using System.Linq; using System.Collections.Generic; - +using Duplicati.Library.IO; + namespace Duplicati.CommandLine.RecoveryTool { public static class Restore @@ -148,7 +149,7 @@ namespace Duplicati.CommandLine.RecoveryTool Console.WriteLine("Restoring {0} files to {1}", filecount, string.IsNullOrWhiteSpace(targetpath) ? "original position" : targetpath); if (Library.Utility.Utility.IsClientLinux || largestprefix.Length > 0) - largestprefix = Library.Utility.Utility.AppendDirSeparator(largestprefix); + largestprefix = Util.AppendDirSeparator(largestprefix); if (!string.IsNullOrEmpty(largestprefix)) Console.WriteLine("Removing common prefix {0} from files", largestprefix); diff --git a/Duplicati/GUI/Duplicati.GUI.TrayIcon/Duplicati.GUI.TrayIcon.csproj b/Duplicati/GUI/Duplicati.GUI.TrayIcon/Duplicati.GUI.TrayIcon.csproj index 7023768d3..adc121222 100644 --- a/Duplicati/GUI/Duplicati.GUI.TrayIcon/Duplicati.GUI.TrayIcon.csproj +++ b/Duplicati/GUI/Duplicati.GUI.TrayIcon/Duplicati.GUI.TrayIcon.csproj @@ -78,12 +78,18 @@ ..\..\..\thirdparty\appindicator-sharp\gdk-sharp.dll + gtk-sharp-2.0 ..\..\..\thirdparty\appindicator-sharp\gtk-sharp.dll + gtk-sharp-2.0 + + + glib-sharp-2.0 + + + gtk-sharp-2.0 - - ..\..\..\thirdparty\MonoMac\MonoMac.dll @@ -334,6 +340,10 @@ {0797AA22-C5DD-4950-BB60-34765AB8C6DD} Duplicati.Tools + + {D63E53E4-A458-4C2F-914D-92F715F58ACF} + Duplicati.Library.IO + diff --git a/Duplicati/GUI/Duplicati.GUI.TrayIcon/HttpServerConnection.cs b/Duplicati/GUI/Duplicati.GUI.TrayIcon/HttpServerConnection.cs index 167010c18..8a7615b23 100644 --- a/Duplicati/GUI/Duplicati.GUI.TrayIcon/HttpServerConnection.cs +++ b/Duplicati/GUI/Duplicati.GUI.TrayIcon/HttpServerConnection.cs @@ -1,8 +1,9 @@ -using System; +using System; using System.Collections.Generic; using System.Linq; using System.Net; using System.Text; +using Duplicati.Library.IO; using Duplicati.Server.Serialization; using Duplicati.Server.Serialization.Interface; @@ -76,7 +77,7 @@ namespace Duplicati.GUI.TrayIcon public HttpServerConnection(Uri server, string password, bool saltedpassword, Program.PasswordSource passwordSource, bool disableTrayIconLogin, Dictionary options) { - m_baseUri = Duplicati.Library.Utility.Utility.AppendDirSeparator(server.ToString(), "/"); + m_baseUri = Util.AppendDirSeparator(server.ToString(), "/"); m_apiUri = m_baseUri + "api/v1"; diff --git a/Duplicati/Library/AutoUpdater/Duplicati.Library.AutoUpdater.csproj b/Duplicati/Library/AutoUpdater/Duplicati.Library.AutoUpdater.csproj index 99c1279a9..2588f027f 100644 --- a/Duplicati/Library/AutoUpdater/Duplicati.Library.AutoUpdater.csproj +++ b/Duplicati/Library/AutoUpdater/Duplicati.Library.AutoUpdater.csproj @@ -67,6 +67,10 @@ {4D012CB1-4B92-47F4-89B7-BF80A73A2E99} Duplicati.License + + {D63E53E4-A458-4C2F-914D-92F715F58ACF} + Duplicati.Library.IO + diff --git a/Duplicati/Library/AutoUpdater/Program.cs b/Duplicati/Library/AutoUpdater/Program.cs index d02781dd4..fd9d31ba1 100644 --- a/Duplicati/Library/AutoUpdater/Program.cs +++ b/Duplicati/Library/AutoUpdater/Program.cs @@ -18,7 +18,8 @@ using System; using System.Linq; using System.Collections.Generic; - +using Duplicati.Library.IO; + namespace Duplicati.Library.AutoUpdater { public static class Program @@ -61,7 +62,7 @@ namespace Duplicati.Library.AutoUpdater { var versions = UpdaterManager.FindInstalledVersions(); var selfdir = System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location); - if (string.Equals(Library.Utility.Utility.AppendDirSeparator(selfdir), Library.Utility.Utility.AppendDirSeparator(UpdaterManager.InstalledBaseDir))) + if (string.Equals(Util.AppendDirSeparator(selfdir), Util.AppendDirSeparator(UpdaterManager.InstalledBaseDir))) versions = versions.Union(new KeyValuePair[] { new KeyValuePair(selfdir, UpdaterManager.SelfVersion) }); Console.WriteLine(string.Join(Environment.NewLine, versions.Select(x => string.Format(" {0} {1} ({2})", (x.Value.Version == UpdaterManager.SelfVersion.Version ? "*" : "-"), x.Value.Displayname, x.Value.Version)))); return 0; @@ -71,7 +72,7 @@ namespace Duplicati.Library.AutoUpdater { var versions = UpdaterManager.FindInstalledVersions(); var selfdir = System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location); - if (string.Equals(Library.Utility.Utility.AppendDirSeparator(selfdir), Library.Utility.Utility.AppendDirSeparator(UpdaterManager.InstalledBaseDir))) + if (string.Equals(Util.AppendDirSeparator(selfdir), Util.AppendDirSeparator(UpdaterManager.InstalledBaseDir))) versions = versions.Union(new KeyValuePair[] { new KeyValuePair(selfdir, UpdaterManager.SelfVersion) }); Console.WriteLine(string.Join(Environment.NewLine, versions.Select(x => string.Format(" {0} {1} ({2}): {3}", (x.Value.Version == UpdaterManager.SelfVersion.Version ? "*" : "-"), x.Value.Displayname, x.Value.Version, UpdaterManager.VerifyUnpackedFolder(x.Key, x.Value) ? "Valid" : "*** Modified ***")))); diff --git a/Duplicati/Library/AutoUpdater/UpdaterManager.cs b/Duplicati/Library/AutoUpdater/UpdaterManager.cs index 961d122e3..be0b9d890 100644 --- a/Duplicati/Library/AutoUpdater/UpdaterManager.cs +++ b/Duplicati/Library/AutoUpdater/UpdaterManager.cs @@ -21,7 +21,8 @@ using System.Collections.Generic; using System.IO; using System.Threading.Tasks; using Duplicati.Library.Interface; - +using Duplicati.Library.IO; + namespace Duplicati.Library.AutoUpdater { public enum AutoUpdateStrategy @@ -149,7 +150,7 @@ namespace Duplicati.Library.AutoUpdater var attempts = new List(); // We do not want to install anything in the basedir, if the application is installed in "ProgramFiles" - if (!string.IsNullOrWhiteSpace(programfiles) && !InstalledBaseDir.StartsWith(Library.Utility.Utility.AppendDirSeparator(programfiles), StringComparison.Ordinal)) + if (!string.IsNullOrWhiteSpace(programfiles) && !InstalledBaseDir.StartsWith(Util.AppendDirSeparator(programfiles), StringComparison.Ordinal)) attempts.Add(System.IO.Path.Combine(InstalledBaseDir, "updates")); if (Library.Utility.Utility.IsClientOSX) @@ -510,7 +511,7 @@ namespace Duplicati.Library.AutoUpdater System.IO.Directory.CreateDirectory(targetfolder); - var tempfolderpath = Duplicati.Library.Utility.Utility.AppendDirSeparator(tempfolder); + var tempfolderpath = Util.AppendDirSeparator(tempfolder); var tempfolderlength = tempfolderpath.Length; // Would be nice, but does not work :( @@ -605,9 +606,9 @@ namespace Duplicati.Library.AutoUpdater var paths = update.Files.Where(x => !x.Ignore).ToDictionary(x => x.Path.Replace('/', System.IO.Path.DirectorySeparatorChar), Library.Utility.Utility.ClientFilenameStringComparer); paths.Add(manifest.Path, manifest); - var ignores = (from x in update.Files where x.Ignore select Library.Utility.Utility.AppendDirSeparator(x.Path.Replace('/', System.IO.Path.DirectorySeparatorChar))).ToList(); + var ignores = (from x in update.Files where x.Ignore select Util.AppendDirSeparator(x.Path.Replace('/', System.IO.Path.DirectorySeparatorChar))).ToList(); - folder = Library.Utility.Utility.AppendDirSeparator(folder); + folder = Util.AppendDirSeparator(folder); var baselen = folder.Length; foreach (var file in Library.Utility.Utility.EnumerateFileSystemEntries(folder)) @@ -718,7 +719,7 @@ namespace Duplicati.Library.AutoUpdater var localManifest = remoteManifest.Clone(); localManifest.RemoteURLS = null; - inputfolder = Duplicati.Library.Utility.Utility.AppendDirSeparator(inputfolder); + inputfolder = Util.AppendDirSeparator(inputfolder); var baselen = inputfolder.Length; var dirsep = System.IO.Path.DirectorySeparatorChar.ToString(); diff --git a/Duplicati/Library/Backend/AlternativeFTP/AlternativeFTPBackend.cs b/Duplicati/Library/Backend/AlternativeFTP/AlternativeFTPBackend.cs index 631dd9ace..c91d54c46 100644 --- a/Duplicati/Library/Backend/AlternativeFTP/AlternativeFTPBackend.cs +++ b/Duplicati/Library/Backend/AlternativeFTP/AlternativeFTPBackend.cs @@ -147,7 +147,7 @@ namespace Duplicati.Library.Backend.AlternativeFTP _userInfo.Domain = ""; _url = u.SetScheme("ftp").SetQuery(null).SetCredentials(null, null).ToString(); - _url = Duplicati.Library.Utility.Utility.AppendDirSeparator(_url, "/"); + _url = IO.Util.AppendDirSeparator(_url, "/"); _listVerify = !CoreUtility.ParseBoolOption(options, "disable-upload-verify"); // Process the aftp-data-connection-type option diff --git a/Duplicati/Library/Backend/AlternativeFTP/Duplicati.Library.Backend.AlternativeFTP.csproj b/Duplicati/Library/Backend/AlternativeFTP/Duplicati.Library.Backend.AlternativeFTP.csproj index 3acbabe71..fbf41f3ff 100644 --- a/Duplicati/Library/Backend/AlternativeFTP/Duplicati.Library.Backend.AlternativeFTP.csproj +++ b/Duplicati/Library/Backend/AlternativeFTP/Duplicati.Library.Backend.AlternativeFTP.csproj @@ -72,6 +72,10 @@ {DE3E5D4C-51AB-4E5E-BEE8-E636CEBFBA65} Duplicati.Library.Utility + + {D63E53E4-A458-4C2F-914D-92F715F58ACF} + Duplicati.Library.IO +