From e93e36c6807e24716d7c4684eee4d794e9af70aa Mon Sep 17 00:00:00 2001 From: L Day Date: Thu, 21 Sep 2017 14:58:53 -0400 Subject: [PATCH 01/24] Delete ISSUE_TEMPLATE.md --- .github/ISSUE_TEMPLATE.md | 2 -- 1 file changed, 2 deletions(-) delete mode 100644 .github/ISSUE_TEMPLATE.md diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md deleted file mode 100644 index dd23e00ae..000000000 --- a/.github/ISSUE_TEMPLATE.md +++ /dev/null @@ -1,2 +0,0 @@ - \ No newline at end of file From 9df53be10336fb3dea72175ea92d0fb6c6824dc8 Mon Sep 17 00:00:00 2001 From: L Day Date: Thu, 21 Sep 2017 14:59:18 -0400 Subject: [PATCH 02/24] Rename ISSUE_TEMPLATE.md to .github/ISSUE_TEMPLATE.md --- ISSUE_TEMPLATE.md => .github/ISSUE_TEMPLATE.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename ISSUE_TEMPLATE.md => .github/ISSUE_TEMPLATE.md (100%) diff --git a/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md similarity index 100% rename from ISSUE_TEMPLATE.md rename to .github/ISSUE_TEMPLATE.md From 8a7a2684988e6610365900a9b39ffc28a15d3ab5 Mon Sep 17 00:00:00 2001 From: L Day Date: Thu, 21 Sep 2017 15:03:09 -0400 Subject: [PATCH 03/24] Added donation link again --- .github/ISSUE_TEMPLATE.md | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md index 75df8a8b3..49d08340b 100644 --- a/.github/ISSUE_TEMPLATE.md +++ b/.github/ISSUE_TEMPLATE.md @@ -1,4 +1,5 @@ + From 811acac0737a8975f7531fe08136ee86a5d94cba Mon Sep 17 00:00:00 2001 From: Tyler Gill Date: Thu, 21 Sep 2017 23:44:24 -0600 Subject: [PATCH 04/24] Fix warning that the default-filters parameter isn't supported. --- Duplicati/CommandLine/Help.cs | 2 -- Duplicati/CommandLine/Program.cs | 1 - Duplicati/CommandLine/Strings.cs | 2 -- Duplicati/Library/Main/Options.cs | 9 ++++++--- Duplicati/Library/Main/Strings.cs | 8 +++++--- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/Duplicati/CommandLine/Help.cs b/Duplicati/CommandLine/Help.cs index 575c85626..c088eb0c7 100644 --- a/Duplicati/CommandLine/Help.cs +++ b/Duplicati/CommandLine/Help.cs @@ -84,8 +84,6 @@ namespace Duplicati.CommandLine topic = "exclude"; else if (System.Environment.CommandLine.IndexOf("--include", StringComparison.OrdinalIgnoreCase) >= 0) topic = "include"; - else if (System.Environment.CommandLine.IndexOf("--default-filters", StringComparison.OrdinalIgnoreCase) >= 0) - topic = "default-filters"; } diff --git a/Duplicati/CommandLine/Program.cs b/Duplicati/CommandLine/Program.cs index e34d0fe23..3d6239d9e 100644 --- a/Duplicati/CommandLine/Program.cs +++ b/Duplicati/CommandLine/Program.cs @@ -297,7 +297,6 @@ namespace Duplicati.CommandLine new Library.Interface.CommandLineArgument("parameters-file", Library.Interface.CommandLineArgument.ArgumentType.Path, Strings.Program.ParametersFileOptionShort, Strings.Program.ParametersFileOptionLong2, "", new string[] {"parameter-file", "parameterfile"}), new Library.Interface.CommandLineArgument("include", Library.Interface.CommandLineArgument.ArgumentType.String, Strings.Program.IncludeShort, Strings.Program.IncludeLong), new Library.Interface.CommandLineArgument("exclude", Library.Interface.CommandLineArgument.ArgumentType.String, Strings.Program.ExcludeShort, Strings.Program.ExcludeLong), - new Library.Interface.CommandLineArgument("default-filters", Library.Interface.CommandLineArgument.ArgumentType.String, Strings.Program.DefaultFiltersShort, Strings.Program.DefaultFiltersLong(DefaultFilterSet.Windows.ToString(), DefaultFilterSet.OSX.ToString(), DefaultFilterSet.Linux.ToString(), DefaultFilterSet.All.ToString()), string.Empty, new[] { "default-filter" }), new Library.Interface.CommandLineArgument("control-files", Library.Interface.CommandLineArgument.ArgumentType.Boolean, Strings.Program.ControlFilesOptionShort, Strings.Program.ControlFilesOptionLong, "false"), new Library.Interface.CommandLineArgument("quiet-console", Library.Interface.CommandLineArgument.ArgumentType.Boolean, Strings.Program.QuietConsoleOptionShort, Strings.Program.QuietConsoleOptionLong, "false"), new Library.Interface.CommandLineArgument("auto-update", Library.Interface.CommandLineArgument.ArgumentType.Boolean, LC.L("Toggle automatic updates"), LC.L("Set this option if you prefer to have the commandline version automatically update"), "false"), diff --git a/Duplicati/CommandLine/Strings.cs b/Duplicati/CommandLine/Strings.cs index 57e2de0fc..ef9a45258 100644 --- a/Duplicati/CommandLine/Strings.cs +++ b/Duplicati/CommandLine/Strings.cs @@ -26,8 +26,6 @@ namespace Duplicati.CommandLine.Strings { public static string IncludeShort { get { return LC.L(@"Include files"); } } public static string ExcludeLong { get { return LC.L(@"Exclude files that match this filter. The special character * means any number of character, and the special character ? means any single character, use *.txt to exclude all files with a txt extension. Regular expressions are also supported and can be supplied by using hard braces, i.e. [.*\.txt]."); } } public static string ExcludeShort { get { return LC.L(@"Exclude files"); } } - public static string DefaultFiltersLong(string windows, string osx, string linux, string all) { return LC.L(@"Exclude files that match the given filter sets. Which default filter sets should be used. Valid sets are ""{0}"", ""{1}"", ""{2}"", and ""{3}"". If this parameter is set with no value, the set for the current operating system will be used.", windows, osx, linux, all); } - public static string DefaultFiltersShort { get { return LC.L(@"Default filter sets"); } } public static string ControlFilesOptionShort { get { return LC.L(@"If this option is used with a backup operation, it is interpreted as a list of files to add to the filesets. When used with list or restore, it will list or restore the control files instead of the normal files."); } } public static string ControlFilesOptionLong { get { return LC.L(@"Use control files"); } } public static string QuietConsoleOptionLong { get { return LC.L(@"If this option is set, progress reports and other messages that would normally go to the console will be redirected to the log."); } } diff --git a/Duplicati/Library/Main/Options.cs b/Duplicati/Library/Main/Options.cs index 84dd8de5c..b14c5aaa1 100644 --- a/Duplicati/Library/Main/Options.cs +++ b/Duplicati/Library/Main/Options.cs @@ -22,6 +22,7 @@ using System.Linq; using System.Collections.Generic; using System.Text; using Duplicati.Library.Interface; +using Duplicati.Library.Utility; namespace Duplicati.Library.Main { @@ -462,6 +463,8 @@ namespace Duplicati.Library.Main new CommandLineArgument("quota-size", CommandLineArgument.ArgumentType.Size, Strings.Options.QuotasizeShort, Strings.Options.QuotasizeLong), + new CommandLineArgument("default-filters", CommandLineArgument.ArgumentType.String, Strings.Options.DefaultFiltersShort, Strings.Options.DefaultFiltersLong(DefaultFilterSet.Windows.ToString(), DefaultFilterSet.OSX.ToString(), DefaultFilterSet.Linux.ToString(), DefaultFilterSet.All.ToString()), string.Empty, new[] { "default-filter" }), + new CommandLineArgument("symlink-policy", CommandLineArgument.ArgumentType.Enumeration, Strings.Options.SymlinkpolicyShort, Strings.Options.SymlinkpolicyLong("store", "ignore", "follow"), Enum.GetName(typeof(SymlinkStrategy), SymlinkStrategy.Store), null, Enum.GetNames(typeof(SymlinkStrategy))), new CommandLineArgument("hardlink-policy", CommandLineArgument.ArgumentType.Enumeration, Strings.Options.HardlinkpolicyShort, Strings.Options.HardlinkpolicyLong("first", "all", "none"), Enum.GetName(typeof(HardlinkStrategy), HardlinkStrategy.All), null, Enum.GetNames(typeof(HardlinkStrategy))), new CommandLineArgument("exclude-files-attributes", CommandLineArgument.ArgumentType.String, Strings.Options.ExcludefilesattributesShort, Strings.Options.ExcludefilesattributesLong(Enum.GetNames(typeof(System.IO.FileAttributes)))), @@ -480,8 +483,8 @@ namespace Duplicati.Library.Main new CommandLineArgument("skip-metadata", CommandLineArgument.ArgumentType.Boolean, Strings.Options.SkipmetadataShort, Strings.Options.SkipmetadataLong, "false"), new CommandLineArgument("restore-permissions", CommandLineArgument.ArgumentType.Boolean, Strings.Options.RestorepermissionsShort, Strings.Options.RestorepermissionsLong, "false"), new CommandLineArgument("skip-restore-verification", CommandLineArgument.ArgumentType.Boolean, Strings.Options.SkiprestoreverificationShort, Strings.Options.SkiprestoreverificationLong, "false"), - new CommandLineArgument("disable-filepath-cache", CommandLineArgument.ArgumentType.Boolean, Strings.Options.DisablefilepathcacheShort, Strings.Options.DisablefilepathcacheLong, "true"), - new CommandLineArgument("use-block-cache", CommandLineArgument.ArgumentType.Boolean, Strings.Options.UseblockcacheShort, Strings.Options.UseblockcacheLong, "false"), + new CommandLineArgument("disable-filepath-cache", CommandLineArgument.ArgumentType.Boolean, Strings.Options.DisablefilepathcacheShort, Strings.Options.DisablefilepathcacheLong, "true"), + new CommandLineArgument("use-block-cache", CommandLineArgument.ArgumentType.Boolean, Strings.Options.UseblockcacheShort, Strings.Options.UseblockcacheLong, "false"), new CommandLineArgument("changed-files", CommandLineArgument.ArgumentType.Path, Strings.Options.ChangedfilesShort, Strings.Options.ChangedfilesLong), new CommandLineArgument("deleted-files", CommandLineArgument.ArgumentType.Path, Strings.Options.DeletedfilesShort, Strings.Options.DeletedfilesLong("changed-files")), new CommandLineArgument("disable-synthetic-filelist", CommandLineArgument.ArgumentType.Boolean, Strings.Options.DisablesyntheticfilelistShort, Strings.Options.DisablesyntehticfilelistLong, "false"), @@ -1462,7 +1465,7 @@ namespace Duplicati.Library.Main { get { - return Library.Utility.Utility.ParseBoolOption(m_options, "use-block-cache"); + return Library.Utility.Utility.ParseBoolOption(m_options, "use-block-cache"); } } diff --git a/Duplicati/Library/Main/Strings.cs b/Duplicati/Library/Main/Strings.cs index 9160b7d84..4c268b7ca 100644 --- a/Duplicati/Library/Main/Strings.cs +++ b/Duplicati/Library/Main/Strings.cs @@ -119,6 +119,8 @@ namespace Duplicati.Library.Main.Strings public static string UploadUnchangedBackupsShort { get { return LC.L(@"Upload empty backup files"); } } public static string QuotasizeLong { get { return LC.L(@"This value can be used to set a known upper limit on the amount of space a backend has. If the backend reports the size itself, this value is ignored"); } } public static string QuotasizeShort { get { return LC.L(@"A reported maximum storage"); } } + public static string DefaultFiltersLong(string windows, string osx, string linux, string all) { return LC.L(@"Exclude files that match the given filter sets. Which default filter sets should be used. Valid sets are ""{0}"", ""{1}"", ""{2}"", and ""{3}"". If this parameter is set with no value, the set for the current operating system will be used.", windows, osx, linux, all); } + public static string DefaultFiltersShort { get { return LC.L(@"Default filter sets"); } } public static string SymlinkpolicyShort { get { return LC.L(@"Symlink handling"); } } public static string SymlinkpolicyLong(string store, string ignore, string follow) { return LC.L(@"Use this option to handle symlinks differently. The ""{0}"" option will simply record a symlink with its name and destination, and a restore will recreate the symlink as a link. Use the option ""{1}"" to ignore all symlinks and not store any information about them. Previous versions of Duplicati used the setting ""{2}"", which will cause symlinked files to be included and restore as normal files.", store, ignore, follow); } public static string HardlinkpolicyShort { get { return LC.L(@"Hardlink handling"); } } @@ -144,9 +146,9 @@ namespace Duplicati.Library.Main.Strings public static string FilehashlookupsizeLong { get { return LC.L(@"A fragment of memory is used to reduce database lookups. You should not change this value unless you get warnings in the log."); } } public static string FilehashlookupsizeShort { get { return LC.L(@"Memory used by the file hash"); } } public static string DisablefilepathcacheLong { get { return LC.L(@"This option can be used to reduce the memory footprint by not keeping paths and modification timestamps in memory"); } } - public static string DisablefilepathcacheShort { get { return LC.L(@"Reduce memory footprint by disabling in-memory lookups"); } } - public static string UseblockcacheShort { get { return LC.L(@"This option can be used to increase speed in exchange for extra memory use."); } } - public static string UseblockcacheLong { get { return LC.L(@"Store an in-memory block cache"); } } + public static string DisablefilepathcacheShort { get { return LC.L(@"Reduce memory footprint by disabling in-memory lookups"); } } + public static string UseblockcacheShort { get { return LC.L(@"This option can be used to increase speed in exchange for extra memory use."); } } + public static string UseblockcacheLong { get { return LC.L(@"Store an in-memory block cache"); } } public static string StoremetadataLong { get { return LC.L(@"Stores metadata, such as file timestamps and attributes. This increases the required storage space as well as the processing time."); } } public static string StoremetadataShort { get { return LC.L(@"Enables storing file metadata"); } } public static string StoremetadataDeprecated { get { return LC.L(@"This option is no longer used as metadata is now stored by default"); } } From e78e40fb11efd11124194b07a5f8da31986ca24d Mon Sep 17 00:00:00 2001 From: Tyler Gill Date: Thu, 21 Sep 2017 23:44:46 -0600 Subject: [PATCH 05/24] Fix some documentation errors in backend interfaces. --- Duplicati/Library/Interface/IBackend.cs | 3 +-- Duplicati/Library/Interface/IRenameEnabledBackend.cs | 10 ++++------ 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/Duplicati/Library/Interface/IBackend.cs b/Duplicati/Library/Interface/IBackend.cs index df78a28d7..a8b5532b9 100644 --- a/Duplicati/Library/Interface/IBackend.cs +++ b/Duplicati/Library/Interface/IBackend.cs @@ -48,7 +48,6 @@ namespace Duplicati.Library.Interface /// /// Returns a list of files found on the remote location /// - /// The url passed /// The list of files List List(); @@ -82,7 +81,7 @@ namespace Duplicati.Library.Interface /// string Description { get; } - /// + /// /// The purpose of this method is to test the connection to the remote backend. /// If any problem is encountered, this method should throw an exception. /// If the encountered problem is a missing target "folder", diff --git a/Duplicati/Library/Interface/IRenameEnabledBackend.cs b/Duplicati/Library/Interface/IRenameEnabledBackend.cs index 1185b8c53..550e098e9 100644 --- a/Duplicati/Library/Interface/IRenameEnabledBackend.cs +++ b/Duplicati/Library/Interface/IRenameEnabledBackend.cs @@ -24,17 +24,15 @@ using System.Text; namespace Duplicati.Library.Interface { /// - /// An interface a backend may implement if it supports streaming operations. - /// Backends that implement this interface can be throttled and correctly shows - /// the progressbar when transfering data. + /// An interface a backend may implement if it supports rename operations. /// public interface IRenameEnabledBackend : IBackend { /// - /// Puts the content of the file to the url passed + /// Renames the file /// - /// The remote filename, relative to the URL - /// The stream to read from + /// The old filename, relative to the root + /// The new filename, relative to the root void Rename(string oldname, string newname); } } From 7c3ce32ee2b625933dcc6b8e1cab631ea502b141 Mon Sep 17 00:00:00 2001 From: Tyler Gill Date: Fri, 22 Sep 2017 00:30:10 -0600 Subject: [PATCH 06/24] Add support for the quota reporting and renaming interfaces to the OneDrive backend. To test the quota support, quota information is reported on the command line if it is available. However, the rename support hasn't been tested, since I don't see anything using that functionality yet. --- Duplicati/CommandLine/Commands.cs | 21 +++- .../Library/Backend/OneDrive/OneDrive.cs | 107 ++++++++++++++++-- 2 files changed, 115 insertions(+), 13 deletions(-) diff --git a/Duplicati/CommandLine/Commands.cs b/Duplicati/CommandLine/Commands.cs index 0ae5f7fcc..9e429b1c5 100644 --- a/Duplicati/CommandLine/Commands.cs +++ b/Duplicati/CommandLine/Commands.cs @@ -582,16 +582,29 @@ namespace Duplicati.CommandLine { var parsedStats = result.BackendStatistics as Duplicati.Library.Interface.IParsedBackendStatistics; output.MessageEvent(string.Format(" Duration of backup: {0:hh\\:mm\\:ss}", result.Duration)); - if (parsedStats != null && parsedStats.KnownFileCount > 0) + if (parsedStats != null) { - output.MessageEvent(string.Format(" Remote files: {0}", parsedStats.KnownFileCount)); - output.MessageEvent(string.Format(" Remote size: {0}", Library.Utility.Utility.FormatSizeString(parsedStats.KnownFileSize))); + if (parsedStats.KnownFileCount > 0) + { + output.MessageEvent(string.Format(" Remote files: {0}", parsedStats.KnownFileCount)); + output.MessageEvent(string.Format(" Remote size: {0}", Library.Utility.Utility.FormatSizeString(parsedStats.KnownFileSize))); + } + + if (parsedStats.TotalQuotaSpace >= 0) + { + output.MessageEvent(string.Format(" Total quota: {0}", Library.Utility.Utility.FormatSizeString(parsedStats.TotalQuotaSpace))); + } + + if (parsedStats.FreeQuotaSpace >= 0) + { + output.MessageEvent(string.Format(" Available quota: {0}", Library.Utility.Utility.FormatSizeString(parsedStats.FreeQuotaSpace))); + } } output.MessageEvent(string.Format(" Files added: {0}", result.AddedFiles)); output.MessageEvent(string.Format(" Files deleted: {0}", result.DeletedFiles)); output.MessageEvent(string.Format(" Files changed: {0}", result.ModifiedFiles)); - + output.MessageEvent(string.Format(" Data uploaded: {0}", Library.Utility.Utility.FormatSizeString(result.BackendStatistics.BytesUploaded))); output.MessageEvent(string.Format(" Data downloaded: {0}", Library.Utility.Utility.FormatSizeString(result.BackendStatistics.BytesDownloaded))); } diff --git a/Duplicati/Library/Backend/OneDrive/OneDrive.cs b/Duplicati/Library/Backend/OneDrive/OneDrive.cs index 289dd024a..2b85409bb 100644 --- a/Duplicati/Library/Backend/OneDrive/OneDrive.cs +++ b/Duplicati/Library/Backend/OneDrive/OneDrive.cs @@ -7,7 +7,7 @@ using Duplicati.Library.Interface; namespace Duplicati.Library.Backend { - public class OneDrive : IBackend, IStreamingBackend + public class OneDrive : IBackend, IStreamingBackend, IQuotaEnabledBackend, IRenameEnabledBackend { private const string AUTHID_OPTION = "authid"; @@ -73,11 +73,11 @@ namespace Duplicati.Library.Backend public string upload_location { get; set; } public string type { get; set; } [Newtonsoft.Json.JsonProperty(NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public DateTime created_time { get; set; } + public DateTime? created_time { get; set; } [Newtonsoft.Json.JsonProperty(NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public DateTime updated_time { get; set; } + public DateTime? updated_time { get; set; } [Newtonsoft.Json.JsonProperty(NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public long size { get; set; } + public long? size { get; set; } } private class WLID_CreateFolderData @@ -106,13 +106,21 @@ namespace Duplicati.Library.Backend public string locale { get; set; } } + private class WLID_QuotaInfo + { + [Newtonsoft.Json.JsonProperty("quota")] + public long? Quota { get; set; } + [Newtonsoft.Json.JsonProperty("available")] + public long? Available { get; set; } + } + private WLID_FolderItem FindFolder(string folder, string parentfolder = null) { if (string.IsNullOrWhiteSpace(parentfolder)) parentfolder = ROOT_FOLDER_ID; var url = string.Format("{0}/{1}?access_token={2}", WLID_SERVER, string.Format(FOLDER_TEMPLATE, parentfolder), Library.Utility.Uri.UrlEncode(m_oauth.AccessToken)); - var res = m_oauth.GetJSONData(url); + var res = m_oauth.GetJSONData(url, x => x.UserAgent = USER_AGENT); if (res == null || res.data == null) return null; @@ -130,7 +138,7 @@ namespace Duplicati.Library.Backend if (folders.Length == 0) { var url = string.Format("{0}/{1}?access_token={2}", WLID_SERVER, ROOT_FOLDER_ID, Library.Utility.Uri.UrlEncode(m_oauth.AccessToken)); - return m_oauth.GetJSONData(url); + return m_oauth.GetJSONData(url, x => x.UserAgent = USER_AGENT); } WLID_FolderItem cur = null; @@ -214,6 +222,12 @@ namespace Duplicati.Library.Backend return id; } + private WLID_QuotaInfo GetQuotaInfo() + { + var url = string.Format("{0}/me/skydrive/quota?access_token={1}", WLID_SERVER, Library.Utility.Uri.UrlEncode(m_oauth.AccessToken)); + return m_oauth.GetJSONData(url, x => x.UserAgent = USER_AGENT); + } + #region IBackend Members public void Test() @@ -248,7 +262,7 @@ namespace Duplicati.Library.Backend while(count == FILE_LIST_PAGE_SIZE) { var url = string.Format("{0}/{1}?access_token={2}&limit={3}&offset={4}", WLID_SERVER, string.Format(FOLDER_TEMPLATE, FolderID), Library.Utility.Uri.UrlEncode(m_oauth.AccessToken), FILE_LIST_PAGE_SIZE, offset); - var res = m_oauth.GetJSONData(url); + var res = m_oauth.GetJSONData(url, x => x.UserAgent = USER_AGENT); if (res != null && res.data != null) { @@ -257,7 +271,7 @@ namespace Duplicati.Library.Backend { m_fileidCache.Add(r.name, r.id); - var fe = new FileEntry(r.name, r.size, r.updated_time, r.updated_time); + var fe = new FileEntry(r.name, r.size.Value, r.updated_time.Value, r.updated_time.Value); fe.IsFolder = string.Equals(r.type, "folder", StringComparison.OrdinalIgnoreCase); files.Add(fe); } @@ -293,6 +307,7 @@ namespace Duplicati.Library.Backend var id = GetFileID(remotename); var url = string.Format("{0}/{1}?access_token={2}", WLID_SERVER, id, Library.Utility.Uri.UrlEncode(m_oauth.AccessToken)); var req = (HttpWebRequest)WebRequest.Create(url); + req.UserAgent = USER_AGENT; req.Method = "DELETE"; var areq = new Utility.AsyncHttpRequest(req); @@ -354,8 +369,9 @@ namespace Duplicati.Library.Backend { var url = string.Format("{0}/me?access_token={1}", WLID_SERVER, Library.Utility.Uri.UrlEncode(m_oauth.AccessToken)); var req = (HttpWebRequest)WebRequest.Create(url); + req.UserAgent = USER_AGENT; var areq = new Utility.AsyncHttpRequest(req); - + using(var resp = (HttpWebResponse)areq.GetResponse()) using(var rs = areq.GetResponseStream()) using(var tr = new System.IO.StreamReader(rs)) @@ -367,6 +383,79 @@ namespace Duplicati.Library.Backend } } + #region IRenameEnabledBackend + + public void Rename(string oldname, string newname) + { + try + { + try + { + var id = GetFileID(oldname); + var url = string.Format("{0}/{1}?access_token={2}", WLID_SERVER, id, Library.Utility.Uri.UrlEncode(m_oauth.AccessToken)); + var req = (HttpWebRequest)WebRequest.Create(url); + req.UserAgent = USER_AGENT; + req.Method = "PUT"; + + var updateData = new WLID_FolderItem() { name = newname }; + var data = System.Text.Encoding.UTF8.GetBytes(Newtonsoft.Json.JsonConvert.SerializeObject(updateData)); + req.ContentLength = data.Length; + req.ContentType = "application/json; charset=UTF-8"; + using (var requestStream = req.GetRequestStream()) + requestStream.Write(data, 0, data.Length); + + var areq = new Utility.AsyncHttpRequest(req); + using (var resp = (HttpWebResponse)areq.GetResponse()) + { + if (resp.StatusCode == System.Net.HttpStatusCode.NotFound) + throw new FileMissingException(); + + if ((int)resp.StatusCode < 200 || (int)resp.StatusCode > 299) + throw new ProtocolViolationException(Strings.OneDrive.UnexpectedError(resp.StatusCode, resp.StatusDescription)); + + m_fileidCache[newname] = id; + m_fileidCache.Remove(oldname); + } + } + catch + { + // Since we don't know the state of file IDs, clear the cache + m_fileidCache.Clear(); + + throw; + } + } + catch (System.Net.WebException wex) + { + if (wex.Response is System.Net.HttpWebResponse && ((System.Net.HttpWebResponse)wex.Response).StatusCode == System.Net.HttpStatusCode.NotFound) + throw new FileMissingException(wex); + else + throw; + } + } + + #endregion + + #region IQuotaEnabledBackend Members + + public long TotalQuotaSpace + { + get + { + return this.GetQuotaInfo().Quota ?? -1; + } + } + + public long FreeQuotaSpace + { + get + { + return this.GetQuotaInfo().Available ?? -1; + } + } + + #endregion + #region IStreamingBackend Members public void Put(string remotename, System.IO.Stream stream) From 14989410521a4268f130133484692dfaae8672f0 Mon Sep 17 00:00:00 2001 From: Tyler Gill Date: Fri, 22 Sep 2017 00:31:15 -0600 Subject: [PATCH 07/24] Update command line message. --- Duplicati/CommandLine/Commands.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Duplicati/CommandLine/Commands.cs b/Duplicati/CommandLine/Commands.cs index 9e429b1c5..55a366e02 100644 --- a/Duplicati/CommandLine/Commands.cs +++ b/Duplicati/CommandLine/Commands.cs @@ -592,12 +592,12 @@ namespace Duplicati.CommandLine if (parsedStats.TotalQuotaSpace >= 0) { - output.MessageEvent(string.Format(" Total quota: {0}", Library.Utility.Utility.FormatSizeString(parsedStats.TotalQuotaSpace))); + output.MessageEvent(string.Format(" Total remote quota: {0}", Library.Utility.Utility.FormatSizeString(parsedStats.TotalQuotaSpace))); } if (parsedStats.FreeQuotaSpace >= 0) { - output.MessageEvent(string.Format(" Available quota: {0}", Library.Utility.Utility.FormatSizeString(parsedStats.FreeQuotaSpace))); + output.MessageEvent(string.Format(" Available remote quota: {0}", Library.Utility.Utility.FormatSizeString(parsedStats.FreeQuotaSpace))); } } From 5970562022719f87b5aa64f9d5c7bc8b56de2dc0 Mon Sep 17 00:00:00 2001 From: Kenneth Skovhede Date: Sat, 23 Sep 2017 00:15:53 +0200 Subject: [PATCH 08/24] Bugfix: better error message when there is no password for SSH backend --- Duplicati/Library/Backend/SSHv2/SSHv2Backend.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Duplicati/Library/Backend/SSHv2/SSHv2Backend.cs b/Duplicati/Library/Backend/SSHv2/SSHv2Backend.cs index d32958872..503ea4d80 100644 --- a/Duplicati/Library/Backend/SSHv2/SSHv2Backend.cs +++ b/Duplicati/Library/Backend/SSHv2/SSHv2Backend.cs @@ -257,7 +257,7 @@ namespace Duplicati.Library.Backend if (!string.IsNullOrWhiteSpace(keyfile)) con = new SftpClient(m_server, m_port, m_username, ValidateKeyFile(keyfile, m_password)); else - con = new SftpClient(m_server, m_port, m_username, m_password); + con = new SftpClient(m_server, m_port, m_username, m_password ?? string.Empty); con.HostKeyReceived += delegate (object sender, HostKeyEventArgs e) { From a06f38442a783043262cd6953e6907480a2a4924 Mon Sep 17 00:00:00 2001 From: Kenneth Skovhede Date: Sat, 23 Sep 2017 00:25:50 +0200 Subject: [PATCH 09/24] Updated all Newtonsoft.Json packages --- .../RecoveryTool/Duplicati.CommandLine.RecoveryTool.csproj | 2 +- Duplicati/CommandLine/RecoveryTool/packages.config | 2 +- .../Duplicati.GUI.TrayIcon/Duplicati.GUI.TrayIcon.csproj | 4 ++-- Duplicati/GUI/Duplicati.GUI.TrayIcon/packages.config | 2 +- .../AutoUpdater/Duplicati.Library.AutoUpdater.csproj | 2 +- Duplicati/Library/AutoUpdater/packages.config | 2 +- .../Duplicati.Library.Backend.AmazonCloudDrive.csproj | 2 +- Duplicati/Library/Backend/AmazonCloudDrive/packages.config | 2 +- .../AzureBlob/Duplicati.Library.Backend.AzureBlob.csproj | 6 +++--- Duplicati/Library/Backend/AzureBlob/packages.config | 2 +- .../Backblaze/Duplicati.Library.Backend.Backblaze.csproj | 2 +- Duplicati/Library/Backend/Backblaze/packages.config | 2 +- .../Backend/Box/Duplicati.Library.Backend.Box.csproj | 2 +- Duplicati/Library/Backend/Box/packages.config | 2 +- .../Duplicati.Library.Backend.GoogleServices.csproj | 2 +- Duplicati/Library/Backend/GoogleServices/packages.config | 2 +- .../Backend/Mega/Duplicati.Library.Backend.Mega.csproj | 6 +++--- Duplicati/Library/Backend/Mega/packages.config | 2 +- .../OAuthHelper/Duplicati.Library.OAuthHelper.csproj | 2 +- Duplicati/Library/Backend/OAuthHelper/packages.config | 2 +- .../OneDrive/Duplicati.Library.Backend.OneDrive.csproj | 2 +- Duplicati/Library/Backend/OneDrive/packages.config | 2 +- .../OpenStack/Duplicati.Library.Backend.OpenStack.csproj | 2 +- Duplicati/Library/Backend/OpenStack/packages.config | 2 +- .../TahoeLAFS/Duplicati.Library.Backend.TahoeLAFS.csproj | 2 +- Duplicati/Library/Backend/TahoeLAFS/packages.config | 2 +- Duplicati/Library/Main/Duplicati.Library.Main.csproj | 2 +- Duplicati/Library/Main/packages.config | 2 +- .../Builtin/Duplicati.Library.Modules.Builtin.csproj | 6 +++--- Duplicati/Library/Modules/Builtin/packages.config | 2 +- .../Library/Snapshots/Duplicati.Library.Snapshots.csproj | 6 +++--- Duplicati/Library/Snapshots/packages.config | 2 +- .../Duplicati.Server.Serialization.csproj | 2 +- .../Server/Duplicati.Server.Serialization/packages.config | 2 +- Duplicati/Server/Duplicati.Server.csproj | 2 +- Duplicati/Server/packages.config | 2 +- 36 files changed, 45 insertions(+), 45 deletions(-) diff --git a/Duplicati/CommandLine/RecoveryTool/Duplicati.CommandLine.RecoveryTool.csproj b/Duplicati/CommandLine/RecoveryTool/Duplicati.CommandLine.RecoveryTool.csproj index 36b99861b..565830a4a 100644 --- a/Duplicati/CommandLine/RecoveryTool/Duplicati.CommandLine.RecoveryTool.csproj +++ b/Duplicati/CommandLine/RecoveryTool/Duplicati.CommandLine.RecoveryTool.csproj @@ -40,7 +40,7 @@ - ..\..\..\packages\Newtonsoft.Json.10.0.2\lib\net45\Newtonsoft.Json.dll + ..\..\..\packages\Newtonsoft.Json.10.0.3\lib\net45\Newtonsoft.Json.dll diff --git a/Duplicati/CommandLine/RecoveryTool/packages.config b/Duplicati/CommandLine/RecoveryTool/packages.config index a272c64df..ee51c2373 100644 --- a/Duplicati/CommandLine/RecoveryTool/packages.config +++ b/Duplicati/CommandLine/RecoveryTool/packages.config @@ -1,4 +1,4 @@  - + \ No newline at end of file diff --git a/Duplicati/GUI/Duplicati.GUI.TrayIcon/Duplicati.GUI.TrayIcon.csproj b/Duplicati/GUI/Duplicati.GUI.TrayIcon/Duplicati.GUI.TrayIcon.csproj index 507192cbd..22624d747 100644 --- a/Duplicati/GUI/Duplicati.GUI.TrayIcon/Duplicati.GUI.TrayIcon.csproj +++ b/Duplicati/GUI/Duplicati.GUI.TrayIcon/Duplicati.GUI.TrayIcon.csproj @@ -92,7 +92,7 @@ ..\..\..\packages\CoCoL.1.5.0\lib\net45\CoCoL.dll - ..\..\..\packages\Newtonsoft.Json.10.0.2\lib\net45\Newtonsoft.Json.dll + ..\..\..\packages\Newtonsoft.Json.10.0.3\lib\net45\Newtonsoft.Json.dll @@ -138,11 +138,11 @@ - + diff --git a/Duplicati/GUI/Duplicati.GUI.TrayIcon/packages.config b/Duplicati/GUI/Duplicati.GUI.TrayIcon/packages.config index e3cd52bcd..cc176f965 100644 --- a/Duplicati/GUI/Duplicati.GUI.TrayIcon/packages.config +++ b/Duplicati/GUI/Duplicati.GUI.TrayIcon/packages.config @@ -1,5 +1,5 @@  - + \ No newline at end of file diff --git a/Duplicati/Library/AutoUpdater/Duplicati.Library.AutoUpdater.csproj b/Duplicati/Library/AutoUpdater/Duplicati.Library.AutoUpdater.csproj index 85bf1046d..99c1279a9 100644 --- a/Duplicati/Library/AutoUpdater/Duplicati.Library.AutoUpdater.csproj +++ b/Duplicati/Library/AutoUpdater/Duplicati.Library.AutoUpdater.csproj @@ -37,7 +37,7 @@ - ..\..\..\packages\Newtonsoft.Json.10.0.2\lib\net45\Newtonsoft.Json.dll + ..\..\..\packages\Newtonsoft.Json.10.0.3\lib\net45\Newtonsoft.Json.dll diff --git a/Duplicati/Library/AutoUpdater/packages.config b/Duplicati/Library/AutoUpdater/packages.config index a272c64df..ee51c2373 100644 --- a/Duplicati/Library/AutoUpdater/packages.config +++ b/Duplicati/Library/AutoUpdater/packages.config @@ -1,4 +1,4 @@  - + \ No newline at end of file diff --git a/Duplicati/Library/Backend/AmazonCloudDrive/Duplicati.Library.Backend.AmazonCloudDrive.csproj b/Duplicati/Library/Backend/AmazonCloudDrive/Duplicati.Library.Backend.AmazonCloudDrive.csproj index 9bc53af09..c8a3b4888 100644 --- a/Duplicati/Library/Backend/AmazonCloudDrive/Duplicati.Library.Backend.AmazonCloudDrive.csproj +++ b/Duplicati/Library/Backend/AmazonCloudDrive/Duplicati.Library.Backend.AmazonCloudDrive.csproj @@ -33,7 +33,7 @@ - ..\..\..\..\packages\Newtonsoft.Json.10.0.2\lib\net45\Newtonsoft.Json.dll + ..\..\..\..\packages\Newtonsoft.Json.10.0.3\lib\net45\Newtonsoft.Json.dll diff --git a/Duplicati/Library/Backend/AmazonCloudDrive/packages.config b/Duplicati/Library/Backend/AmazonCloudDrive/packages.config index a272c64df..ee51c2373 100644 --- a/Duplicati/Library/Backend/AmazonCloudDrive/packages.config +++ b/Duplicati/Library/Backend/AmazonCloudDrive/packages.config @@ -1,4 +1,4 @@  - + \ No newline at end of file diff --git a/Duplicati/Library/Backend/AzureBlob/Duplicati.Library.Backend.AzureBlob.csproj b/Duplicati/Library/Backend/AzureBlob/Duplicati.Library.Backend.AzureBlob.csproj index 5f3406d20..9fb64ec9a 100644 --- a/Duplicati/Library/Backend/AzureBlob/Duplicati.Library.Backend.AzureBlob.csproj +++ b/Duplicati/Library/Backend/AzureBlob/Duplicati.Library.Backend.AzureBlob.csproj @@ -42,6 +42,9 @@ ..\..\..\..\packages\Microsoft.Data.Edm.5.8.2\lib\net40\Microsoft.Data.Edm.dll + + ..\..\..\..\packages\Newtonsoft.Json.10.0.3\lib\net45\Newtonsoft.Json.dll + ..\..\..\..\packages\System.Spatial.5.8.2\lib\net40\System.Spatial.dll @@ -54,9 +57,6 @@ ..\..\..\..\packages\WindowsAzure.Storage.8.1.3\lib\net45\Microsoft.WindowsAzure.Storage.dll - - ..\..\..\..\packages\Newtonsoft.Json.10.0.2\lib\net45\Newtonsoft.Json.dll - ..\..\..\..\packages\Microsoft.Azure.KeyVault.Core.2.0.4\lib\net45\Microsoft.Azure.KeyVault.Core.dll diff --git a/Duplicati/Library/Backend/AzureBlob/packages.config b/Duplicati/Library/Backend/AzureBlob/packages.config index 326e00f3a..b7b522fee 100644 --- a/Duplicati/Library/Backend/AzureBlob/packages.config +++ b/Duplicati/Library/Backend/AzureBlob/packages.config @@ -4,7 +4,7 @@ - + diff --git a/Duplicati/Library/Backend/Backblaze/Duplicati.Library.Backend.Backblaze.csproj b/Duplicati/Library/Backend/Backblaze/Duplicati.Library.Backend.Backblaze.csproj index d25421706..539d02496 100644 --- a/Duplicati/Library/Backend/Backblaze/Duplicati.Library.Backend.Backblaze.csproj +++ b/Duplicati/Library/Backend/Backblaze/Duplicati.Library.Backend.Backblaze.csproj @@ -33,7 +33,7 @@ - ..\..\..\..\packages\Newtonsoft.Json.10.0.2\lib\net45\Newtonsoft.Json.dll + ..\..\..\..\packages\Newtonsoft.Json.10.0.3\lib\net45\Newtonsoft.Json.dll diff --git a/Duplicati/Library/Backend/Backblaze/packages.config b/Duplicati/Library/Backend/Backblaze/packages.config index a272c64df..ee51c2373 100644 --- a/Duplicati/Library/Backend/Backblaze/packages.config +++ b/Duplicati/Library/Backend/Backblaze/packages.config @@ -1,4 +1,4 @@  - + \ No newline at end of file diff --git a/Duplicati/Library/Backend/Box/Duplicati.Library.Backend.Box.csproj b/Duplicati/Library/Backend/Box/Duplicati.Library.Backend.Box.csproj index 03fa5ee4f..2a9d73501 100644 --- a/Duplicati/Library/Backend/Box/Duplicati.Library.Backend.Box.csproj +++ b/Duplicati/Library/Backend/Box/Duplicati.Library.Backend.Box.csproj @@ -33,7 +33,7 @@ - ..\..\..\..\packages\Newtonsoft.Json.10.0.2\lib\net45\Newtonsoft.Json.dll + ..\..\..\..\packages\Newtonsoft.Json.10.0.3\lib\net45\Newtonsoft.Json.dll diff --git a/Duplicati/Library/Backend/Box/packages.config b/Duplicati/Library/Backend/Box/packages.config index a272c64df..ee51c2373 100644 --- a/Duplicati/Library/Backend/Box/packages.config +++ b/Duplicati/Library/Backend/Box/packages.config @@ -1,4 +1,4 @@  - + \ No newline at end of file diff --git a/Duplicati/Library/Backend/GoogleServices/Duplicati.Library.Backend.GoogleServices.csproj b/Duplicati/Library/Backend/GoogleServices/Duplicati.Library.Backend.GoogleServices.csproj index f7afe59a6..14fd2ea1c 100644 --- a/Duplicati/Library/Backend/GoogleServices/Duplicati.Library.Backend.GoogleServices.csproj +++ b/Duplicati/Library/Backend/GoogleServices/Duplicati.Library.Backend.GoogleServices.csproj @@ -32,7 +32,7 @@ - ..\..\..\..\packages\Newtonsoft.Json.10.0.2\lib\net45\Newtonsoft.Json.dll + ..\..\..\..\packages\Newtonsoft.Json.10.0.3\lib\net45\Newtonsoft.Json.dll diff --git a/Duplicati/Library/Backend/GoogleServices/packages.config b/Duplicati/Library/Backend/GoogleServices/packages.config index a272c64df..ee51c2373 100644 --- a/Duplicati/Library/Backend/GoogleServices/packages.config +++ b/Duplicati/Library/Backend/GoogleServices/packages.config @@ -1,4 +1,4 @@  - + \ No newline at end of file diff --git a/Duplicati/Library/Backend/Mega/Duplicati.Library.Backend.Mega.csproj b/Duplicati/Library/Backend/Mega/Duplicati.Library.Backend.Mega.csproj index d6f8b6884..bbfaad3be 100644 --- a/Duplicati/Library/Backend/Mega/Duplicati.Library.Backend.Mega.csproj +++ b/Duplicati/Library/Backend/Mega/Duplicati.Library.Backend.Mega.csproj @@ -32,14 +32,14 @@ - - ..\..\..\..\packages\Newtonsoft.Json.10.0.2\lib\net45\Newtonsoft.Json.dll - ..\..\..\..\packages\MegaApiClient.1.6.0\lib\net45\MegaApiClient.dll + + ..\..\..\..\packages\Newtonsoft.Json.10.0.3\lib\net45\Newtonsoft.Json.dll + diff --git a/Duplicati/Library/Backend/Mega/packages.config b/Duplicati/Library/Backend/Mega/packages.config index b258c864f..8755a7493 100644 --- a/Duplicati/Library/Backend/Mega/packages.config +++ b/Duplicati/Library/Backend/Mega/packages.config @@ -1,6 +1,6 @@  - + \ No newline at end of file diff --git a/Duplicati/Library/Backend/OAuthHelper/Duplicati.Library.OAuthHelper.csproj b/Duplicati/Library/Backend/OAuthHelper/Duplicati.Library.OAuthHelper.csproj index 5a89ea5fc..7079ee68f 100644 --- a/Duplicati/Library/Backend/OAuthHelper/Duplicati.Library.OAuthHelper.csproj +++ b/Duplicati/Library/Backend/OAuthHelper/Duplicati.Library.OAuthHelper.csproj @@ -33,7 +33,7 @@ - ..\..\..\..\packages\Newtonsoft.Json.10.0.2\lib\net45\Newtonsoft.Json.dll + ..\..\..\..\packages\Newtonsoft.Json.10.0.3\lib\net45\Newtonsoft.Json.dll diff --git a/Duplicati/Library/Backend/OAuthHelper/packages.config b/Duplicati/Library/Backend/OAuthHelper/packages.config index a272c64df..ee51c2373 100644 --- a/Duplicati/Library/Backend/OAuthHelper/packages.config +++ b/Duplicati/Library/Backend/OAuthHelper/packages.config @@ -1,4 +1,4 @@  - + \ No newline at end of file diff --git a/Duplicati/Library/Backend/OneDrive/Duplicati.Library.Backend.OneDrive.csproj b/Duplicati/Library/Backend/OneDrive/Duplicati.Library.Backend.OneDrive.csproj index a29d3d805..c03f0b385 100644 --- a/Duplicati/Library/Backend/OneDrive/Duplicati.Library.Backend.OneDrive.csproj +++ b/Duplicati/Library/Backend/OneDrive/Duplicati.Library.Backend.OneDrive.csproj @@ -45,7 +45,7 @@ - ..\..\..\..\packages\Newtonsoft.Json.10.0.2\lib\net45\Newtonsoft.Json.dll + ..\..\..\..\packages\Newtonsoft.Json.10.0.3\lib\net45\Newtonsoft.Json.dll diff --git a/Duplicati/Library/Backend/OneDrive/packages.config b/Duplicati/Library/Backend/OneDrive/packages.config index a272c64df..ee51c2373 100644 --- a/Duplicati/Library/Backend/OneDrive/packages.config +++ b/Duplicati/Library/Backend/OneDrive/packages.config @@ -1,4 +1,4 @@  - + \ No newline at end of file diff --git a/Duplicati/Library/Backend/OpenStack/Duplicati.Library.Backend.OpenStack.csproj b/Duplicati/Library/Backend/OpenStack/Duplicati.Library.Backend.OpenStack.csproj index 5c1edea05..29289d27c 100644 --- a/Duplicati/Library/Backend/OpenStack/Duplicati.Library.Backend.OpenStack.csproj +++ b/Duplicati/Library/Backend/OpenStack/Duplicati.Library.Backend.OpenStack.csproj @@ -33,7 +33,7 @@ - ..\..\..\..\packages\Newtonsoft.Json.10.0.2\lib\net45\Newtonsoft.Json.dll + ..\..\..\..\packages\Newtonsoft.Json.10.0.3\lib\net45\Newtonsoft.Json.dll diff --git a/Duplicati/Library/Backend/OpenStack/packages.config b/Duplicati/Library/Backend/OpenStack/packages.config index a272c64df..ee51c2373 100644 --- a/Duplicati/Library/Backend/OpenStack/packages.config +++ b/Duplicati/Library/Backend/OpenStack/packages.config @@ -1,4 +1,4 @@  - + \ No newline at end of file diff --git a/Duplicati/Library/Backend/TahoeLAFS/Duplicati.Library.Backend.TahoeLAFS.csproj b/Duplicati/Library/Backend/TahoeLAFS/Duplicati.Library.Backend.TahoeLAFS.csproj index ca4b21113..ff93fd131 100644 --- a/Duplicati/Library/Backend/TahoeLAFS/Duplicati.Library.Backend.TahoeLAFS.csproj +++ b/Duplicati/Library/Backend/TahoeLAFS/Duplicati.Library.Backend.TahoeLAFS.csproj @@ -41,7 +41,7 @@ - ..\..\..\..\packages\Newtonsoft.Json.10.0.2\lib\net45\Newtonsoft.Json.dll + ..\..\..\..\packages\Newtonsoft.Json.10.0.3\lib\net45\Newtonsoft.Json.dll diff --git a/Duplicati/Library/Backend/TahoeLAFS/packages.config b/Duplicati/Library/Backend/TahoeLAFS/packages.config index a272c64df..ee51c2373 100644 --- a/Duplicati/Library/Backend/TahoeLAFS/packages.config +++ b/Duplicati/Library/Backend/TahoeLAFS/packages.config @@ -1,4 +1,4 @@  - + \ No newline at end of file diff --git a/Duplicati/Library/Main/Duplicati.Library.Main.csproj b/Duplicati/Library/Main/Duplicati.Library.Main.csproj index b63d02029..3d3c9773a 100644 --- a/Duplicati/Library/Main/Duplicati.Library.Main.csproj +++ b/Duplicati/Library/Main/Duplicati.Library.Main.csproj @@ -41,7 +41,7 @@ - ..\..\..\packages\Newtonsoft.Json.10.0.2\lib\net45\Newtonsoft.Json.dll + ..\..\..\packages\Newtonsoft.Json.10.0.3\lib\net45\Newtonsoft.Json.dll diff --git a/Duplicati/Library/Main/packages.config b/Duplicati/Library/Main/packages.config index a272c64df..ee51c2373 100644 --- a/Duplicati/Library/Main/packages.config +++ b/Duplicati/Library/Main/packages.config @@ -1,4 +1,4 @@  - + \ No newline at end of file diff --git a/Duplicati/Library/Modules/Builtin/Duplicati.Library.Modules.Builtin.csproj b/Duplicati/Library/Modules/Builtin/Duplicati.Library.Modules.Builtin.csproj index 8155c8dbe..7057c2c44 100644 --- a/Duplicati/Library/Modules/Builtin/Duplicati.Library.Modules.Builtin.csproj +++ b/Duplicati/Library/Modules/Builtin/Duplicati.Library.Modules.Builtin.csproj @@ -51,15 +51,15 @@ - - ..\..\..\..\packages\Newtonsoft.Json.10.0.2\lib\net45\Newtonsoft.Json.dll - ..\..\..\..\packages\MimeKit.1.16.1\lib\net45\MimeKit.dll ..\..\..\..\packages\MailKit.1.16.1\lib\net45\MailKit.dll + + ..\..\..\..\packages\Newtonsoft.Json.10.0.3\lib\net45\Newtonsoft.Json.dll + diff --git a/Duplicati/Library/Modules/Builtin/packages.config b/Duplicati/Library/Modules/Builtin/packages.config index 312695333..b2fb2a76e 100644 --- a/Duplicati/Library/Modules/Builtin/packages.config +++ b/Duplicati/Library/Modules/Builtin/packages.config @@ -4,5 +4,5 @@ - + \ No newline at end of file diff --git a/Duplicati/Library/Snapshots/Duplicati.Library.Snapshots.csproj b/Duplicati/Library/Snapshots/Duplicati.Library.Snapshots.csproj index 821f6df78..fa1a9b206 100644 --- a/Duplicati/Library/Snapshots/Duplicati.Library.Snapshots.csproj +++ b/Duplicati/Library/Snapshots/Duplicati.Library.Snapshots.csproj @@ -51,12 +51,12 @@ ..\..\..\packages\AlphaFS.2.1.2\lib\net45\AlphaFS.dll - - ..\..\..\packages\Newtonsoft.Json.10.0.2\lib\net45\Newtonsoft.Json.dll - ..\..\..\packages\AlphaVSS.1.4.0\lib\net45\AlphaVSS.Common.dll + + ..\..\..\packages\Newtonsoft.Json.10.0.3\lib\net45\Newtonsoft.Json.dll + diff --git a/Duplicati/Library/Snapshots/packages.config b/Duplicati/Library/Snapshots/packages.config index 0e70e905a..455c342ba 100644 --- a/Duplicati/Library/Snapshots/packages.config +++ b/Duplicati/Library/Snapshots/packages.config @@ -2,5 +2,5 @@ - + \ No newline at end of file diff --git a/Duplicati/Server/Duplicati.Server.Serialization/Duplicati.Server.Serialization.csproj b/Duplicati/Server/Duplicati.Server.Serialization/Duplicati.Server.Serialization.csproj index ee78e1244..eade340a0 100644 --- a/Duplicati/Server/Duplicati.Server.Serialization/Duplicati.Server.Serialization.csproj +++ b/Duplicati/Server/Duplicati.Server.Serialization/Duplicati.Server.Serialization.csproj @@ -42,7 +42,7 @@ - ..\..\..\packages\Newtonsoft.Json.10.0.2\lib\net45\Newtonsoft.Json.dll + ..\..\..\packages\Newtonsoft.Json.10.0.3\lib\net45\Newtonsoft.Json.dll diff --git a/Duplicati/Server/Duplicati.Server.Serialization/packages.config b/Duplicati/Server/Duplicati.Server.Serialization/packages.config index a272c64df..ee51c2373 100644 --- a/Duplicati/Server/Duplicati.Server.Serialization/packages.config +++ b/Duplicati/Server/Duplicati.Server.Serialization/packages.config @@ -1,4 +1,4 @@  - + \ No newline at end of file diff --git a/Duplicati/Server/Duplicati.Server.csproj b/Duplicati/Server/Duplicati.Server.csproj index c93052735..d8f9221b1 100644 --- a/Duplicati/Server/Duplicati.Server.csproj +++ b/Duplicati/Server/Duplicati.Server.csproj @@ -59,7 +59,7 @@ - ..\..\packages\Newtonsoft.Json.10.0.2\lib\net45\Newtonsoft.Json.dll + ..\..\packages\Newtonsoft.Json.10.0.3\lib\net45\Newtonsoft.Json.dll diff --git a/Duplicati/Server/packages.config b/Duplicati/Server/packages.config index cd032d1e3..efc598b08 100644 --- a/Duplicati/Server/packages.config +++ b/Duplicati/Server/packages.config @@ -1,5 +1,5 @@  - + \ No newline at end of file From 26746cd9035dfe8e7d7d3469dc0da65f1d9d927c Mon Sep 17 00:00:00 2001 From: Kenneth Skovhede Date: Sat, 23 Sep 2017 00:26:38 +0200 Subject: [PATCH 10/24] Update the azureblob libraries --- .../Duplicati.Library.Backend.AzureBlob.csproj | 16 ++++++++-------- .../Library/Backend/AzureBlob/packages.config | 10 +++++----- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/Duplicati/Library/Backend/AzureBlob/Duplicati.Library.Backend.AzureBlob.csproj b/Duplicati/Library/Backend/AzureBlob/Duplicati.Library.Backend.AzureBlob.csproj index 9fb64ec9a..48e488838 100644 --- a/Duplicati/Library/Backend/AzureBlob/Duplicati.Library.Backend.AzureBlob.csproj +++ b/Duplicati/Library/Backend/AzureBlob/Duplicati.Library.Backend.AzureBlob.csproj @@ -39,26 +39,26 @@ + + ..\..\..\..\packages\Microsoft.Azure.KeyVault.Core.2.0.4\lib\net45\Microsoft.Azure.KeyVault.Core.dll + - ..\..\..\..\packages\Microsoft.Data.Edm.5.8.2\lib\net40\Microsoft.Data.Edm.dll + ..\..\..\..\packages\Microsoft.Data.Edm.5.8.3\lib\net40\Microsoft.Data.Edm.dll ..\..\..\..\packages\Newtonsoft.Json.10.0.3\lib\net45\Newtonsoft.Json.dll - ..\..\..\..\packages\System.Spatial.5.8.2\lib\net40\System.Spatial.dll + ..\..\..\..\packages\System.Spatial.5.8.3\lib\net40\System.Spatial.dll - ..\..\..\..\packages\Microsoft.Data.OData.5.8.2\lib\net40\Microsoft.Data.OData.dll + ..\..\..\..\packages\Microsoft.Data.OData.5.8.3\lib\net40\Microsoft.Data.OData.dll - ..\..\..\..\packages\Microsoft.Data.Services.Client.5.8.2\lib\net40\Microsoft.Data.Services.Client.dll + ..\..\..\..\packages\Microsoft.Data.Services.Client.5.8.3\lib\net40\Microsoft.Data.Services.Client.dll - ..\..\..\..\packages\WindowsAzure.Storage.8.1.3\lib\net45\Microsoft.WindowsAzure.Storage.dll - - - ..\..\..\..\packages\Microsoft.Azure.KeyVault.Core.2.0.4\lib\net45\Microsoft.Azure.KeyVault.Core.dll + ..\..\..\..\packages\WindowsAzure.Storage.8.4.0\lib\net45\Microsoft.WindowsAzure.Storage.dll diff --git a/Duplicati/Library/Backend/AzureBlob/packages.config b/Duplicati/Library/Backend/AzureBlob/packages.config index b7b522fee..720f12ed8 100644 --- a/Duplicati/Library/Backend/AzureBlob/packages.config +++ b/Duplicati/Library/Backend/AzureBlob/packages.config @@ -1,14 +1,14 @@  - - - + + + - - + + \ No newline at end of file From 93e04180c68df0931c50ded244025c78cac4cf27 Mon Sep 17 00:00:00 2001 From: Kenneth Skovhede Date: Sat, 23 Sep 2017 00:27:06 +0200 Subject: [PATCH 11/24] Updated the AWS libraries for S3 --- .../Library/Backend/S3/Duplicati.Library.Backend.S3.csproj | 6 +++--- Duplicati/Library/Backend/S3/packages.config | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Duplicati/Library/Backend/S3/Duplicati.Library.Backend.S3.csproj b/Duplicati/Library/Backend/S3/Duplicati.Library.Backend.S3.csproj index 1b3a0cc71..415e63aef 100644 --- a/Duplicati/Library/Backend/S3/Duplicati.Library.Backend.S3.csproj +++ b/Duplicati/Library/Backend/S3/Duplicati.Library.Backend.S3.csproj @@ -39,13 +39,13 @@ - ..\..\..\..\packages\AWSSDK.Core.3.3.14.2\lib\net45\AWSSDK.Core.dll + ..\..\..\..\packages\AWSSDK.Core.3.3.17.10\lib\net45\AWSSDK.Core.dll - ..\..\..\..\packages\AWSSDK.IdentityManagement.3.3.4\lib\net45\AWSSDK.IdentityManagement.dll + ..\..\..\..\packages\AWSSDK.IdentityManagement.3.3.5\lib\net45\AWSSDK.IdentityManagement.dll - ..\..\..\..\packages\AWSSDK.S3.3.3.7\lib\net45\AWSSDK.S3.dll + ..\..\..\..\packages\AWSSDK.S3.3.3.11\lib\net45\AWSSDK.S3.dll diff --git a/Duplicati/Library/Backend/S3/packages.config b/Duplicati/Library/Backend/S3/packages.config index 5cbaa9296..fc1424bcc 100644 --- a/Duplicati/Library/Backend/S3/packages.config +++ b/Duplicati/Library/Backend/S3/packages.config @@ -1,6 +1,6 @@  - - - + + + \ No newline at end of file From ba36cadde31112f40d1b1475ba16a6d75cada7eb Mon Sep 17 00:00:00 2001 From: Kenneth Skovhede Date: Sat, 23 Sep 2017 00:27:55 +0200 Subject: [PATCH 12/24] Updated Renci.SSH --- .../Backend/SSHv2/Duplicati.Library.Backend.SSHv2.csproj | 2 +- Duplicati/Library/Backend/SSHv2/packages.config | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Duplicati/Library/Backend/SSHv2/Duplicati.Library.Backend.SSHv2.csproj b/Duplicati/Library/Backend/SSHv2/Duplicati.Library.Backend.SSHv2.csproj index 11e61f2d4..96c3b453b 100644 --- a/Duplicati/Library/Backend/SSHv2/Duplicati.Library.Backend.SSHv2.csproj +++ b/Duplicati/Library/Backend/SSHv2/Duplicati.Library.Backend.SSHv2.csproj @@ -40,7 +40,7 @@ - ..\..\..\..\packages\SSH.NET.2016.1.0-beta2\lib\net40\Renci.SshNet.dll + ..\..\..\..\packages\SSH.NET.2016.1.0-beta3\lib\net40\Renci.SshNet.dll diff --git a/Duplicati/Library/Backend/SSHv2/packages.config b/Duplicati/Library/Backend/SSHv2/packages.config index 2d3244778..5df54958b 100644 --- a/Duplicati/Library/Backend/SSHv2/packages.config +++ b/Duplicati/Library/Backend/SSHv2/packages.config @@ -1,4 +1,4 @@  - + \ No newline at end of file From 5f4aef8bbfd75fe72869efcabe45c7a7a673471e Mon Sep 17 00:00:00 2001 From: Kenneth Skovhede Date: Sat, 23 Sep 2017 00:28:25 +0200 Subject: [PATCH 13/24] Update sharpcompress --- .../Library/Compression/Duplicati.Library.Compression.csproj | 2 +- Duplicati/Library/Compression/packages.config | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Duplicati/Library/Compression/Duplicati.Library.Compression.csproj b/Duplicati/Library/Compression/Duplicati.Library.Compression.csproj index 275237e36..6b1e5e8b4 100644 --- a/Duplicati/Library/Compression/Duplicati.Library.Compression.csproj +++ b/Duplicati/Library/Compression/Duplicati.Library.Compression.csproj @@ -42,7 +42,7 @@ ..\..\..\thirdparty\ManagedLZMA\managed-lzma.dll - ..\..\..\packages\sharpcompress.0.18.0\lib\net45\SharpCompress.dll + ..\..\..\packages\SharpCompress.0.18.2\lib\net45\SharpCompress.dll diff --git a/Duplicati/Library/Compression/packages.config b/Duplicati/Library/Compression/packages.config index 29244e074..2c846c9a5 100644 --- a/Duplicati/Library/Compression/packages.config +++ b/Duplicati/Library/Compression/packages.config @@ -1,4 +1,4 @@  - + \ No newline at end of file From b07170d2c909409bcb2f30a1f3b84ada85b96601 Mon Sep 17 00:00:00 2001 From: Kenneth Hsu Date: Fri, 22 Sep 2017 20:52:19 -0700 Subject: [PATCH 14/24] Reference property instead of invoking extension method. The Enumerable.Count method will attempt to cast the object to an ICollection, and if successful, reference the Count property. Since we know that we have a List, we can reference the Count property directly. --- Duplicati/Library/Main/Operation/FilelistProcessor.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Duplicati/Library/Main/Operation/FilelistProcessor.cs b/Duplicati/Library/Main/Operation/FilelistProcessor.cs index 0280bafc6..d1a07875a 100644 --- a/Duplicati/Library/Main/Operation/FilelistProcessor.cs +++ b/Duplicati/Library/Main/Operation/FilelistProcessor.cs @@ -216,9 +216,9 @@ namespace Duplicati.Library.Main.Operation where n.FileType == RemoteVolumeType.Files orderby n.Time descending select n).ToList(); - log.KnownFileCount = remotelist.Count(); + log.KnownFileCount = remotelist.Count; log.KnownFileSize = remotelist.Select(x => Math.Max(0, x.File.Size)).Sum(); - log.UnknownFileCount = unknownlist.Count(); + log.UnknownFileCount = unknownlist.Count; log.UnknownFileSize = unknownlist.Select(x => Math.Max(0, x.Size)).Sum(); log.BackupListCount = filesets.Count; log.LastBackupDate = filesets.Count == 0 ? new DateTime(0) : filesets[0].Time.ToLocalTime(); From b610d60fc21164daeaeb481f32e7124fd8a9bd07 Mon Sep 17 00:00:00 2001 From: Kenneth Skovhede Date: Sat, 23 Sep 2017 14:43:23 +0200 Subject: [PATCH 15/24] Updated System.Net.Http for Mega backend --- Duplicati/Library/Backend/Mega/packages.config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Duplicati/Library/Backend/Mega/packages.config b/Duplicati/Library/Backend/Mega/packages.config index 8755a7493..d8d29881e 100644 --- a/Duplicati/Library/Backend/Mega/packages.config +++ b/Duplicati/Library/Backend/Mega/packages.config @@ -1,6 +1,6 @@  - + \ No newline at end of file From 976cc061e236c9e2b8ba6ae666548c3c157d3325 Mon Sep 17 00:00:00 2001 From: Kenneth Skovhede Date: Sat, 23 Sep 2017 14:43:33 +0200 Subject: [PATCH 16/24] Updated ngettext --- .../Duplicati.Library.Localization.csproj | 14 +++++++------- Duplicati/Library/Localization/packages.config | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Duplicati/Library/Localization/Duplicati.Library.Localization.csproj b/Duplicati/Library/Localization/Duplicati.Library.Localization.csproj index 844e2ae14..1fff0eee3 100644 --- a/Duplicati/Library/Localization/Duplicati.Library.Localization.csproj +++ b/Duplicati/Library/Localization/Duplicati.Library.Localization.csproj @@ -34,11 +34,11 @@ false - - ..\..\..\packages\NGettext.0.6.2\lib\net45\NGettext.dll - True - + + ..\..\..\packages\NGettext.0.6.3\lib\net45\NGettext.dll + + @@ -50,11 +50,11 @@ - - - + + + \ No newline at end of file diff --git a/Duplicati/Library/Localization/packages.config b/Duplicati/Library/Localization/packages.config index e1ed09554..dd9f8d80b 100644 --- a/Duplicati/Library/Localization/packages.config +++ b/Duplicati/Library/Localization/packages.config @@ -1,4 +1,4 @@  - + \ No newline at end of file From fc75d56ef1234955dbbd7851c375d9af741985a4 Mon Sep 17 00:00:00 2001 From: Kenneth Skovhede Date: Sat, 23 Sep 2017 14:43:46 +0200 Subject: [PATCH 17/24] Updated MimeKit and MailKit --- .../Modules/Builtin/Duplicati.Library.Modules.Builtin.csproj | 4 ++-- Duplicati/Library/Modules/Builtin/packages.config | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Duplicati/Library/Modules/Builtin/Duplicati.Library.Modules.Builtin.csproj b/Duplicati/Library/Modules/Builtin/Duplicati.Library.Modules.Builtin.csproj index 7057c2c44..a23687eed 100644 --- a/Duplicati/Library/Modules/Builtin/Duplicati.Library.Modules.Builtin.csproj +++ b/Duplicati/Library/Modules/Builtin/Duplicati.Library.Modules.Builtin.csproj @@ -52,10 +52,10 @@ - ..\..\..\..\packages\MimeKit.1.16.1\lib\net45\MimeKit.dll + ..\..\..\..\packages\MimeKit.1.18.1\lib\net45\MimeKit.dll - ..\..\..\..\packages\MailKit.1.16.1\lib\net45\MailKit.dll + ..\..\..\..\packages\MailKit.1.18.1.1\lib\net45\MailKit.dll ..\..\..\..\packages\Newtonsoft.Json.10.0.3\lib\net45\Newtonsoft.Json.dll diff --git a/Duplicati/Library/Modules/Builtin/packages.config b/Duplicati/Library/Modules/Builtin/packages.config index b2fb2a76e..75d5024ea 100644 --- a/Duplicati/Library/Modules/Builtin/packages.config +++ b/Duplicati/Library/Modules/Builtin/packages.config @@ -2,7 +2,7 @@ - - + + \ No newline at end of file From d6f6b428c19ceeffde34e406cb7777600adbfddb Mon Sep 17 00:00:00 2001 From: Kenneth Skovhede Date: Sat, 23 Sep 2017 14:44:00 +0200 Subject: [PATCH 18/24] Updated AlphaFS --- .../Library/Snapshots/Duplicati.Library.Snapshots.csproj | 6 +++--- Duplicati/Library/Snapshots/packages.config | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Duplicati/Library/Snapshots/Duplicati.Library.Snapshots.csproj b/Duplicati/Library/Snapshots/Duplicati.Library.Snapshots.csproj index fa1a9b206..c8aeceac0 100644 --- a/Duplicati/Library/Snapshots/Duplicati.Library.Snapshots.csproj +++ b/Duplicati/Library/Snapshots/Duplicati.Library.Snapshots.csproj @@ -47,13 +47,13 @@ - - ..\..\..\packages\AlphaFS.2.1.2\lib\net45\AlphaFS.dll - ..\..\..\packages\AlphaVSS.1.4.0\lib\net45\AlphaVSS.Common.dll + + ..\..\..\packages\AlphaFS.2.1.3\lib\net45\AlphaFS.dll + ..\..\..\packages\Newtonsoft.Json.10.0.3\lib\net45\Newtonsoft.Json.dll diff --git a/Duplicati/Library/Snapshots/packages.config b/Duplicati/Library/Snapshots/packages.config index 455c342ba..7f058e904 100644 --- a/Duplicati/Library/Snapshots/packages.config +++ b/Duplicati/Library/Snapshots/packages.config @@ -1,6 +1,6 @@  - + \ No newline at end of file From 644d13ffebc9ee3f86241e43240ad2403368d321 Mon Sep 17 00:00:00 2001 From: Kenneth Skovhede Date: Sat, 23 Sep 2017 14:45:34 +0200 Subject: [PATCH 19/24] Updated CoCoL in the TrayIcon --- .../Duplicati.GUI.TrayIcon/Duplicati.GUI.TrayIcon.csproj | 6 +++--- Duplicati/GUI/Duplicati.GUI.TrayIcon/packages.config | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Duplicati/GUI/Duplicati.GUI.TrayIcon/Duplicati.GUI.TrayIcon.csproj b/Duplicati/GUI/Duplicati.GUI.TrayIcon/Duplicati.GUI.TrayIcon.csproj index 22624d747..2c1366d95 100644 --- a/Duplicati/GUI/Duplicati.GUI.TrayIcon/Duplicati.GUI.TrayIcon.csproj +++ b/Duplicati/GUI/Duplicati.GUI.TrayIcon/Duplicati.GUI.TrayIcon.csproj @@ -88,12 +88,12 @@ False - - ..\..\..\packages\CoCoL.1.5.0\lib\net45\CoCoL.dll - ..\..\..\packages\Newtonsoft.Json.10.0.3\lib\net45\Newtonsoft.Json.dll + + ..\..\..\packages\CoCoL.1.5.1\lib\net45\CoCoL.dll + diff --git a/Duplicati/GUI/Duplicati.GUI.TrayIcon/packages.config b/Duplicati/GUI/Duplicati.GUI.TrayIcon/packages.config index cc176f965..040b8a7cf 100644 --- a/Duplicati/GUI/Duplicati.GUI.TrayIcon/packages.config +++ b/Duplicati/GUI/Duplicati.GUI.TrayIcon/packages.config @@ -1,5 +1,5 @@  - + \ No newline at end of file From 5cae6ca60e488dcdfc97a3c9ba0fe96645acad63 Mon Sep 17 00:00:00 2001 From: Kenneth Skovhede Date: Sat, 23 Sep 2017 14:46:14 +0200 Subject: [PATCH 20/24] Additional updates to NewtonSoft.Json --- .../Backend/Dropbox/Duplicati.Library.Backend.Dropbox.csproj | 2 +- Duplicati/Library/Backend/Dropbox/packages.config | 2 +- .../Library/Backend/Sia/Duplicati.Library.Backend.Sia.csproj | 2 +- Duplicati/Library/Backend/Sia/packages.config | 2 +- .../UsageReporter/Duplicati.Library.UsageReporter.csproj | 2 +- Duplicati/Library/UsageReporter/packages.config | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Duplicati/Library/Backend/Dropbox/Duplicati.Library.Backend.Dropbox.csproj b/Duplicati/Library/Backend/Dropbox/Duplicati.Library.Backend.Dropbox.csproj index 3bfd38fe3..75e2c7264 100644 --- a/Duplicati/Library/Backend/Dropbox/Duplicati.Library.Backend.Dropbox.csproj +++ b/Duplicati/Library/Backend/Dropbox/Duplicati.Library.Backend.Dropbox.csproj @@ -34,7 +34,7 @@ - ..\..\..\..\packages\Newtonsoft.Json.10.0.2\lib\net45\Newtonsoft.Json.dll + ..\..\..\..\packages\Newtonsoft.Json.10.0.3\lib\net45\Newtonsoft.Json.dll diff --git a/Duplicati/Library/Backend/Dropbox/packages.config b/Duplicati/Library/Backend/Dropbox/packages.config index a272c64df..ee51c2373 100644 --- a/Duplicati/Library/Backend/Dropbox/packages.config +++ b/Duplicati/Library/Backend/Dropbox/packages.config @@ -1,4 +1,4 @@  - + \ No newline at end of file diff --git a/Duplicati/Library/Backend/Sia/Duplicati.Library.Backend.Sia.csproj b/Duplicati/Library/Backend/Sia/Duplicati.Library.Backend.Sia.csproj index f5ce4e27c..fefb04749 100644 --- a/Duplicati/Library/Backend/Sia/Duplicati.Library.Backend.Sia.csproj +++ b/Duplicati/Library/Backend/Sia/Duplicati.Library.Backend.Sia.csproj @@ -33,7 +33,7 @@ - ..\..\..\..\packages\Newtonsoft.Json.10.0.2\lib\net45\Newtonsoft.Json.dll + ..\..\..\..\packages\Newtonsoft.Json.10.0.3\lib\net45\Newtonsoft.Json.dll diff --git a/Duplicati/Library/Backend/Sia/packages.config b/Duplicati/Library/Backend/Sia/packages.config index a272c64df..ee51c2373 100644 --- a/Duplicati/Library/Backend/Sia/packages.config +++ b/Duplicati/Library/Backend/Sia/packages.config @@ -1,4 +1,4 @@  - + \ No newline at end of file diff --git a/Duplicati/Library/UsageReporter/Duplicati.Library.UsageReporter.csproj b/Duplicati/Library/UsageReporter/Duplicati.Library.UsageReporter.csproj index 747ef82fd..db65bf4f7 100644 --- a/Duplicati/Library/UsageReporter/Duplicati.Library.UsageReporter.csproj +++ b/Duplicati/Library/UsageReporter/Duplicati.Library.UsageReporter.csproj @@ -35,7 +35,7 @@ ..\..\..\packages\CoCoL.1.5.0\lib\net45\CoCoL.dll - ..\..\..\packages\Newtonsoft.Json.10.0.2\lib\net45\Newtonsoft.Json.dll + ..\..\..\packages\Newtonsoft.Json.10.0.3\lib\net45\Newtonsoft.Json.dll diff --git a/Duplicati/Library/UsageReporter/packages.config b/Duplicati/Library/UsageReporter/packages.config index e3cd52bcd..cc176f965 100644 --- a/Duplicati/Library/UsageReporter/packages.config +++ b/Duplicati/Library/UsageReporter/packages.config @@ -1,5 +1,5 @@  - + \ No newline at end of file From 55116279750b049c0a42111bb205a7455bd1d820 Mon Sep 17 00:00:00 2001 From: Kenneth Skovhede Date: Sat, 23 Sep 2017 14:46:29 +0200 Subject: [PATCH 21/24] Updated CoCoL in UsageReporter --- .../UsageReporter/Duplicati.Library.UsageReporter.csproj | 2 +- Duplicati/Library/UsageReporter/packages.config | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Duplicati/Library/UsageReporter/Duplicati.Library.UsageReporter.csproj b/Duplicati/Library/UsageReporter/Duplicati.Library.UsageReporter.csproj index db65bf4f7..b00614bad 100644 --- a/Duplicati/Library/UsageReporter/Duplicati.Library.UsageReporter.csproj +++ b/Duplicati/Library/UsageReporter/Duplicati.Library.UsageReporter.csproj @@ -32,7 +32,7 @@ - ..\..\..\packages\CoCoL.1.5.0\lib\net45\CoCoL.dll + ..\..\..\packages\CoCoL.1.5.1\lib\net45\CoCoL.dll ..\..\..\packages\Newtonsoft.Json.10.0.3\lib\net45\Newtonsoft.Json.dll diff --git a/Duplicati/Library/UsageReporter/packages.config b/Duplicati/Library/UsageReporter/packages.config index cc176f965..040b8a7cf 100644 --- a/Duplicati/Library/UsageReporter/packages.config +++ b/Duplicati/Library/UsageReporter/packages.config @@ -1,5 +1,5 @@  - + \ No newline at end of file From e999f1d77d998cfe6b8fbfceba86543843032b4c Mon Sep 17 00:00:00 2001 From: Kenneth Skovhede Date: Sat, 23 Sep 2017 14:48:02 +0200 Subject: [PATCH 22/24] Updated nunit --- .travis.yml | 16 ++++++++-------- Duplicati/UnitTest/Duplicati.UnitTest.csproj | 2 +- Duplicati/UnitTest/packages.config | 2 +- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.travis.yml b/.travis.yml index a7a26f3e0..b3587df8f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,7 +2,7 @@ language: csharp solution: Duplicati.sln install: - nuget restore Duplicati.sln - - nuget install NUnit.Runners -Version 3.5.0 -OutputDirectory testrunner + - nuget install NUnit.Runners -Version 3.8.1 -OutputDirectory testrunner - sudo pip install selenium addons: sauce_connect: @@ -54,25 +54,25 @@ script: - echo "travis_fold:end:download_extract_testdata" # run unit tests - echo "travis_fold:start:unit_tests_border" - - if [[ "$JOB" == "job1" ]]; then mono ./testrunner/NUnit.ConsoleRunner.3.5.0/tools/nunit3-console.exe ./Duplicati/UnitTest/bin/Release/Duplicati.UnitTest.dll --where:cat==Border --workers=1; fi + - if [[ "$JOB" == "job1" ]]; then mono ./testrunner/NUnit.ConsoleRunner.3.8.1/tools/nunit3-console.exe ./Duplicati/UnitTest/bin/Release/Duplicati.UnitTest.dll --where:cat==Border --workers=1; fi - echo "travis_fold:end:unit_tests_border" - echo "travis_fold:start:unit_tests_bulknormal" - - if [[ "$JOB" == "job2" ]]; then mono ./testrunner/NUnit.ConsoleRunner.3.5.0/tools/nunit3-console.exe ./Duplicati/UnitTest/bin/Release/Duplicati.UnitTest.dll --where:cat==BulkNormal --workers=1; fi + - if [[ "$JOB" == "job2" ]]; then mono ./testrunner/NUnit.ConsoleRunner.3.8.1/tools/nunit3-console.exe ./Duplicati/UnitTest/bin/Release/Duplicati.UnitTest.dll --where:cat==BulkNormal --workers=1; fi - echo "travis_fold:end:unit_tests_bulknormal" - echo "travis_fold:start:unit_tests_bulknosize" - - if [[ "$JOB" == "job2" ]]; then mono ./testrunner/NUnit.ConsoleRunner.3.5.0/tools/nunit3-console.exe ./Duplicati/UnitTest/bin/Release/Duplicati.UnitTest.dll --where:cat==BulkNoSize --workers=1; fi + - if [[ "$JOB" == "job2" ]]; then mono ./testrunner/NUnit.ConsoleRunner.3.8.1/tools/nunit3-console.exe ./Duplicati/UnitTest/bin/Release/Duplicati.UnitTest.dll --where:cat==BulkNoSize --workers=1; fi - echo "travis_fold:end:unit_tests_bulknosize" - echo "travis_fold:start:unit_tests_svndata" - - if [[ "$JOB" == "job1" ]]; then mono ./testrunner/NUnit.ConsoleRunner.3.5.0/tools/nunit3-console.exe ./Duplicati/UnitTest/bin/Release/Duplicati.UnitTest.dll --where:cat==SVNData --workers=1; fi + - if [[ "$JOB" == "job1" ]]; then mono ./testrunner/NUnit.ConsoleRunner.3.8.1/tools/nunit3-console.exe ./Duplicati/UnitTest/bin/Release/Duplicati.UnitTest.dll --where:cat==SVNData --workers=1; fi - echo "travis_fold:end:unit_tests_svndata" - echo "travis_fold:start:unit_tests_svndatalong" - - if [[ "$JOB" == "job1" ]]; then mono ./testrunner/NUnit.ConsoleRunner.3.5.0/tools/nunit3-console.exe ./Duplicati/UnitTest/bin/Release/Duplicati.UnitTest.dll --where:cat==SVNDataLong --workers=1; fi + - if [[ "$JOB" == "job1" ]]; then mono ./testrunner/NUnit.ConsoleRunner.3.8.1/tools/nunit3-console.exe ./Duplicati/UnitTest/bin/Release/Duplicati.UnitTest.dll --where:cat==SVNDataLong --workers=1; fi - echo "travis_fold:end:unit_tests_svndatalong" - echo "travis_fold:start:unit_tests_targeted" - - if [[ "$JOB" == "job1" ]]; then mono ./testrunner/NUnit.ConsoleRunner.3.5.0/tools/nunit3-console.exe ./Duplicati/UnitTest/bin/Release/Duplicati.UnitTest.dll --where:cat==Targeted --workers=1; fi + - if [[ "$JOB" == "job1" ]]; then mono ./testrunner/NUnit.ConsoleRunner.3.8.1/tools/nunit3-console.exe ./Duplicati/UnitTest/bin/Release/Duplicati.UnitTest.dll --where:cat==Targeted --workers=1; fi - echo "travis_fold:end:unit_tests_targeted" - echo "travis_fold:start:unit_tests_purge" - - if [[ "$JOB" == "job3" ]]; then mono ./testrunner/NUnit.ConsoleRunner.3.5.0/tools/nunit3-console.exe ./Duplicati/UnitTest/bin/Release/Duplicati.UnitTest.dll --where:cat==Purge --workers=1; fi + - if [[ "$JOB" == "job3" ]]; then mono ./testrunner/NUnit.ConsoleRunner.3.8.1/tools/nunit3-console.exe ./Duplicati/UnitTest/bin/Release/Duplicati.UnitTest.dll --where:cat==Purge --workers=1; fi - echo "travis_fold:end:unit_tests_purge" # start server and run gui tests - mono ./Duplicati/GUI/Duplicati.GUI.TrayIcon/bin/Release/Duplicati.Server.exe & diff --git a/Duplicati/UnitTest/Duplicati.UnitTest.csproj b/Duplicati/UnitTest/Duplicati.UnitTest.csproj index b73d49e40..ac905b5f5 100644 --- a/Duplicati/UnitTest/Duplicati.UnitTest.csproj +++ b/Duplicati/UnitTest/Duplicati.UnitTest.csproj @@ -31,7 +31,7 @@ - ..\..\packages\NUnit.3.5.0\lib\net45\nunit.framework.dll + ..\..\packages\NUnit.3.8.1\lib\net45\nunit.framework.dll diff --git a/Duplicati/UnitTest/packages.config b/Duplicati/UnitTest/packages.config index c108d442f..63a0b34d3 100644 --- a/Duplicati/UnitTest/packages.config +++ b/Duplicati/UnitTest/packages.config @@ -1,4 +1,4 @@  - + \ No newline at end of file From 2609dcc5dc06572ada968fadde400f656dc641f3 Mon Sep 17 00:00:00 2001 From: Kenneth Skovhede Date: Sat, 23 Sep 2017 14:52:53 +0200 Subject: [PATCH 23/24] Fixes after library updates --- Duplicati/Library/UsageReporter/EventProcessor.cs | 6 +++--- Duplicati/Library/UsageReporter/Reporter.cs | 4 ++-- Duplicati/UnitTest/CommandLineOperationsTests.cs | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Duplicati/Library/UsageReporter/EventProcessor.cs b/Duplicati/Library/UsageReporter/EventProcessor.cs index 0c112e069..998f91019 100644 --- a/Duplicati/Library/UsageReporter/EventProcessor.cs +++ b/Duplicati/Library/UsageReporter/EventProcessor.cs @@ -81,14 +81,14 @@ namespace Duplicati.Library.UsageReporter for(var i = 0; i < 20; i++) { await Task.Delay(TimeSpan.FromSeconds(1)); - if (self.Input.IsRetired) + if (await self.Input.IsRetiredAsync) return; } foreach (var f in GetAbandonedFiles(null)) { // Check if we should exit - if (self.Input.IsRetired) + if (await self.Input.IsRetiredAsync) return; await self.Output.WriteAsync(f); @@ -133,7 +133,7 @@ namespace Duplicati.Library.UsageReporter foreach (var f in GetAbandonedFiles(tf)) { - if (self.Input.IsRetired) + if (await self.Input.IsRetiredAsync) return; self.Output.WriteNoWait(f); diff --git a/Duplicati/Library/UsageReporter/Reporter.cs b/Duplicati/Library/UsageReporter/Reporter.cs index 7cbb55b27..e89a154ed 100644 --- a/Duplicati/Library/UsageReporter/Reporter.cs +++ b/Duplicati/Library/UsageReporter/Reporter.cs @@ -78,7 +78,7 @@ namespace Duplicati.Library.UsageReporter /// public static void Initialize() { - if (_eventChannel == null || _eventChannel.IsRetired) + if (_eventChannel == null || _eventChannel.IsRetiredAsync.Result) { if (IsDisabled) return; @@ -115,7 +115,7 @@ namespace Duplicati.Library.UsageReporter /// public static void ShutDown() { - if (_eventChannel != null && !_eventChannel.IsRetired) + if (_eventChannel != null && !_eventChannel.IsRetiredAsync.Result) _eventChannel.Retire(); if (ShutdownTask != null) diff --git a/Duplicati/UnitTest/CommandLineOperationsTests.cs b/Duplicati/UnitTest/CommandLineOperationsTests.cs index e1436dfd7..323ff15a5 100644 --- a/Duplicati/UnitTest/CommandLineOperationsTests.cs +++ b/Duplicati/UnitTest/CommandLineOperationsTests.cs @@ -42,7 +42,7 @@ namespace Duplicati.UnitTest } } - [TestFixtureSetUp()] + [OneTimeSetUp] public override void PrepareSourceData() { base.PrepareSourceData(); From 22e05577e294633f995bd163026437973c61ff55 Mon Sep 17 00:00:00 2001 From: Kenneth Skovhede Date: Sat, 23 Sep 2017 14:57:05 +0200 Subject: [PATCH 24/24] Revert "Updated nunit" This reverts commit e999f1d77d998cfe6b8fbfceba86543843032b4c. --- .travis.yml | 16 ++++++++-------- Duplicati/UnitTest/Duplicati.UnitTest.csproj | 2 +- Duplicati/UnitTest/packages.config | 2 +- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.travis.yml b/.travis.yml index b3587df8f..a7a26f3e0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,7 +2,7 @@ language: csharp solution: Duplicati.sln install: - nuget restore Duplicati.sln - - nuget install NUnit.Runners -Version 3.8.1 -OutputDirectory testrunner + - nuget install NUnit.Runners -Version 3.5.0 -OutputDirectory testrunner - sudo pip install selenium addons: sauce_connect: @@ -54,25 +54,25 @@ script: - echo "travis_fold:end:download_extract_testdata" # run unit tests - echo "travis_fold:start:unit_tests_border" - - if [[ "$JOB" == "job1" ]]; then mono ./testrunner/NUnit.ConsoleRunner.3.8.1/tools/nunit3-console.exe ./Duplicati/UnitTest/bin/Release/Duplicati.UnitTest.dll --where:cat==Border --workers=1; fi + - if [[ "$JOB" == "job1" ]]; then mono ./testrunner/NUnit.ConsoleRunner.3.5.0/tools/nunit3-console.exe ./Duplicati/UnitTest/bin/Release/Duplicati.UnitTest.dll --where:cat==Border --workers=1; fi - echo "travis_fold:end:unit_tests_border" - echo "travis_fold:start:unit_tests_bulknormal" - - if [[ "$JOB" == "job2" ]]; then mono ./testrunner/NUnit.ConsoleRunner.3.8.1/tools/nunit3-console.exe ./Duplicati/UnitTest/bin/Release/Duplicati.UnitTest.dll --where:cat==BulkNormal --workers=1; fi + - if [[ "$JOB" == "job2" ]]; then mono ./testrunner/NUnit.ConsoleRunner.3.5.0/tools/nunit3-console.exe ./Duplicati/UnitTest/bin/Release/Duplicati.UnitTest.dll --where:cat==BulkNormal --workers=1; fi - echo "travis_fold:end:unit_tests_bulknormal" - echo "travis_fold:start:unit_tests_bulknosize" - - if [[ "$JOB" == "job2" ]]; then mono ./testrunner/NUnit.ConsoleRunner.3.8.1/tools/nunit3-console.exe ./Duplicati/UnitTest/bin/Release/Duplicati.UnitTest.dll --where:cat==BulkNoSize --workers=1; fi + - if [[ "$JOB" == "job2" ]]; then mono ./testrunner/NUnit.ConsoleRunner.3.5.0/tools/nunit3-console.exe ./Duplicati/UnitTest/bin/Release/Duplicati.UnitTest.dll --where:cat==BulkNoSize --workers=1; fi - echo "travis_fold:end:unit_tests_bulknosize" - echo "travis_fold:start:unit_tests_svndata" - - if [[ "$JOB" == "job1" ]]; then mono ./testrunner/NUnit.ConsoleRunner.3.8.1/tools/nunit3-console.exe ./Duplicati/UnitTest/bin/Release/Duplicati.UnitTest.dll --where:cat==SVNData --workers=1; fi + - if [[ "$JOB" == "job1" ]]; then mono ./testrunner/NUnit.ConsoleRunner.3.5.0/tools/nunit3-console.exe ./Duplicati/UnitTest/bin/Release/Duplicati.UnitTest.dll --where:cat==SVNData --workers=1; fi - echo "travis_fold:end:unit_tests_svndata" - echo "travis_fold:start:unit_tests_svndatalong" - - if [[ "$JOB" == "job1" ]]; then mono ./testrunner/NUnit.ConsoleRunner.3.8.1/tools/nunit3-console.exe ./Duplicati/UnitTest/bin/Release/Duplicati.UnitTest.dll --where:cat==SVNDataLong --workers=1; fi + - if [[ "$JOB" == "job1" ]]; then mono ./testrunner/NUnit.ConsoleRunner.3.5.0/tools/nunit3-console.exe ./Duplicati/UnitTest/bin/Release/Duplicati.UnitTest.dll --where:cat==SVNDataLong --workers=1; fi - echo "travis_fold:end:unit_tests_svndatalong" - echo "travis_fold:start:unit_tests_targeted" - - if [[ "$JOB" == "job1" ]]; then mono ./testrunner/NUnit.ConsoleRunner.3.8.1/tools/nunit3-console.exe ./Duplicati/UnitTest/bin/Release/Duplicati.UnitTest.dll --where:cat==Targeted --workers=1; fi + - if [[ "$JOB" == "job1" ]]; then mono ./testrunner/NUnit.ConsoleRunner.3.5.0/tools/nunit3-console.exe ./Duplicati/UnitTest/bin/Release/Duplicati.UnitTest.dll --where:cat==Targeted --workers=1; fi - echo "travis_fold:end:unit_tests_targeted" - echo "travis_fold:start:unit_tests_purge" - - if [[ "$JOB" == "job3" ]]; then mono ./testrunner/NUnit.ConsoleRunner.3.8.1/tools/nunit3-console.exe ./Duplicati/UnitTest/bin/Release/Duplicati.UnitTest.dll --where:cat==Purge --workers=1; fi + - if [[ "$JOB" == "job3" ]]; then mono ./testrunner/NUnit.ConsoleRunner.3.5.0/tools/nunit3-console.exe ./Duplicati/UnitTest/bin/Release/Duplicati.UnitTest.dll --where:cat==Purge --workers=1; fi - echo "travis_fold:end:unit_tests_purge" # start server and run gui tests - mono ./Duplicati/GUI/Duplicati.GUI.TrayIcon/bin/Release/Duplicati.Server.exe & diff --git a/Duplicati/UnitTest/Duplicati.UnitTest.csproj b/Duplicati/UnitTest/Duplicati.UnitTest.csproj index ac905b5f5..b73d49e40 100644 --- a/Duplicati/UnitTest/Duplicati.UnitTest.csproj +++ b/Duplicati/UnitTest/Duplicati.UnitTest.csproj @@ -31,7 +31,7 @@ - ..\..\packages\NUnit.3.8.1\lib\net45\nunit.framework.dll + ..\..\packages\NUnit.3.5.0\lib\net45\nunit.framework.dll diff --git a/Duplicati/UnitTest/packages.config b/Duplicati/UnitTest/packages.config index 63a0b34d3..c108d442f 100644 --- a/Duplicati/UnitTest/packages.config +++ b/Duplicati/UnitTest/packages.config @@ -1,4 +1,4 @@  - + \ No newline at end of file