Commit Graph
10149 Commits
Author SHA1 Message Date
Tyler Gill b3a3911d98 Change from wrapping yield returning methods with methods that do a try/catch, since they don't work due to lazy evaluation. 2017-09-25 23:19:31 -06:00
Tyler Gill 38883285ee Change IBackend.List() to return IEnumerable instead of List
By changing to IEnumerable, it is possible to iterate only a portion of the list, which is useful when not all entries are needed (e.g., when testing a connection).
All existing backends have been updated, and any which were able to be changed to yield return results in a straightforward way now do.
Many backends had a try/catch in the List() method. Due to the fact that yield returns can't be placed within a try/catch block, these have been refactored to either scope the try/catch to the parts that (should) be the only places throwing exceptions, so that exceptions are still caught and handled.
Note that lazy evaluation may cause some changes in behavior - exceptions that were previously thrown at the point of invokation of List() may now be thrown while it is being enumerated.
I believe this will not be problematic though, as the only well-known exception seems to be FolderMissingException, which should be thrown by Test(), but TestList() attempts to enumerate the list to force this exception.
Any places that require the legacy behavior can get it by simply converting the lazy enumerable to a List()
2017-09-25 23:17:45 -06:00
Kenneth Hsu fe9c760ff1 Avoid using parameter name in exception message.
The parameter name is provided as a separate argument to
ArgumentException.
2017-09-25 19:56:28 -07:00
Kenneth Hsu b84e7bd34d Avoid hard-coded parameter names.
This makes it easier to rename the parameter in the future as we don't
have to search for the parameter name within strings.
2017-09-25 19:54:54 -07:00
Kenneth Hsu e9ffc2cbe1 Add clearer exception message. 2017-09-25 19:54:54 -07:00
Kenneth Hsu 97681a704b Add clearer exception message. 2017-09-25 19:54:54 -07:00
Kenneth Hsu 4950c72128 Add clearer exception message. 2017-09-25 19:54:54 -07:00
Kenneth Hsu 239e62cb91 Fix argument order for ArgumentException. 2017-09-25 19:40:39 -07:00
Kenneth SkovhedeandGitHub 9141ccfd41 Merge pull request #2757 from tygill/feature/quota-info
Add IQuotaInfo interface
2017-09-25 23:05:19 +02:00
Kenneth Skovhede 31e8d7eb14 Updated FasterHashing library 2017-09-25 15:39:33 +02:00
Kenneth Skovhede 98e603073a Fixed orphan curly brace 2017-09-25 14:43:37 +02:00
Kenneth Skovhede bc88be457e Added an option to select the pagesize used in B2 list_bucket requests 2017-09-25 11:56:02 +02:00
Tyler Gill b4f56750f8 Add IQuotaInfo interface
It also makes quota enabled backends return an instance of this interface instead of the quota components separately.
This way, getting quota stats requires only a single remote request on backends like Google Drive and OneDrive.
2017-09-24 17:30:52 -06:00
Kenneth Hsu d2adde730a Use simpler data structures to detect duplicate filenames.
A Dictionary is unnecessary since we don't have any key-value pairs.  We
just need to keep track of a unique collection of filenames.
2017-09-24 08:40:14 -07:00
Kenneth Skovhede 0a54fd87d3 Merge branch 'master' into concurrent_processing
# Conflicts:
#	Duplicati/Library/Main/packages.config
#	Duplicati/Library/UsageReporter/Duplicati.Library.UsageReporter.csproj
#	Duplicati/Library/UsageReporter/packages.config
2017-09-23 22:04:35 +02:00
Kenneth Skovhede 6c921ab3ec Merge branch 'master' of github.com:duplicati/duplicati 2017-09-23 22:01:08 +02:00
Kenneth SkovhedeandGitHub 60b94b758f Merge pull request #2754 from warwickmm/refactor/avoid_extension_method
Reference property instead of invoking extension method.
2017-09-23 15:06:09 +02:00
Kenneth SkovhedeandGitHub ef3eb1854a Merge pull request #2752 from tygill/feature/onedrive-quota-rename
Add support for the quota reporting and renaming interfaces to the OneDrive backend
2017-09-23 15:05:22 +02:00
Kenneth SkovhedeandGitHub b00304ace6 Merge pull request #2751 from tygill/fix/default-filter-warning
Fix default filter warning
2017-09-23 15:02:43 +02:00
Kenneth SkovhedeandGitHub b13ed5a3ba Fix issues template (#2749)
Fix the issue template
2017-09-23 15:00:21 +02:00
Kenneth Skovhede 22e05577e2 Revert "Updated nunit"
This reverts commit e999f1d77d.
2017-09-23 14:57:05 +02:00
Kenneth Skovhede 2609dcc5dc Fixes after library updates 2017-09-23 14:52:53 +02:00
Kenneth Skovhede e999f1d77d Updated nunit 2017-09-23 14:48:02 +02:00
Kenneth Skovhede 5511627975 Updated CoCoL in UsageReporter 2017-09-23 14:46:29 +02:00
Kenneth Skovhede 5cae6ca60e Additional updates to NewtonSoft.Json 2017-09-23 14:46:14 +02:00
Kenneth Skovhede 644d13ffeb Updated CoCoL in the TrayIcon 2017-09-23 14:45:34 +02:00
Kenneth Skovhede d6f6b428c1 Updated AlphaFS 2017-09-23 14:44:00 +02:00
Kenneth Skovhede fc75d56ef1 Updated MimeKit and MailKit 2017-09-23 14:43:46 +02:00
Kenneth Skovhede 976cc061e2 Updated ngettext 2017-09-23 14:43:33 +02:00
Kenneth Skovhede b610d60fc2 Updated System.Net.Http for Mega backend 2017-09-23 14:43:23 +02:00
Kenneth Hsu b07170d2c9 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.
2017-09-22 21:28:43 -07:00
Kenneth Skovhede 5f4aef8bbf Update sharpcompress 2017-09-23 00:28:25 +02:00
Kenneth Skovhede ba36cadde3 Updated Renci.SSH 2017-09-23 00:27:55 +02:00
Kenneth Skovhede 93e04180c6 Updated the AWS libraries for S3 2017-09-23 00:27:06 +02:00
Kenneth Skovhede 26746cd903 Update the azureblob libraries 2017-09-23 00:26:38 +02:00
Kenneth Skovhede a06f38442a Updated all Newtonsoft.Json packages 2017-09-23 00:25:50 +02:00
Kenneth Skovhede 5970562022 Bugfix: better error message when there is no password for SSH backend 2017-09-23 00:15:53 +02:00
Kenneth Skovhede 01c429b176 Switched hash library to use FasterHashing 2017-09-23 00:13:03 +02:00
Tyler Gill 1498941052 Update command line message. 2017-09-22 00:31:15 -06:00
Tyler Gill 7c3ce32ee2 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.
2017-09-22 00:30:10 -06:00
Tyler Gill e78e40fb11 Fix some documentation errors in backend interfaces. 2017-09-21 23:44:46 -06:00
Tyler Gill 811acac073 Fix warning that the default-filters parameter isn't supported. 2017-09-21 23:44:24 -06:00
L DayandGitHub 8a7a268498 Added donation link again 2017-09-21 15:03:09 -04:00
L DayandGitHub 9df53be103 Rename ISSUE_TEMPLATE.md to .github/ISSUE_TEMPLATE.md 2017-09-21 14:59:18 -04:00
L DayandGitHub e93e36c680 Delete ISSUE_TEMPLATE.md 2017-09-21 14:58:53 -04:00
Kenneth Skovhede 860924bb62 Updated main functions to new CoCoL library 2017-09-20 21:03:24 +02:00
Kenneth Skovhede 9688052cc6 Updated usagereporter to the new CoCoL library 2017-09-20 21:03:09 +02:00
Kenneth Skovhede 683b04741d Merge branch 'master' into concurrent_processing
# Conflicts:
#	Duplicati/Library/Main/Operation/BackupHandler.cs

Manually fixed the HashAlgorithmHelper case
2017-09-20 13:56:37 +02:00
Kenneth Skovhede 401f1f3104 Version bump to v2.0.2.8-2.0.2.8_canary_2017-09-20
You can download this build from:

Binaries: https://updates.duplicati.com/canary/duplicati-2.0.2.8_canary_2017-09-20.zip

Signature file: https://updates.duplicati.com/canary/duplicati-2.0.2.8_canary_2017-09-20.zip.sig

ASCII signature file: https://updates.duplicati.com/canary/duplicati-2.0.2.8_canary_2017-09-20.zip.sig.asc

MD5: 40f39df8aa816ae538e0420ca391b835

SHA1: fbfe0b71cfd1d7ffd366b2c0e47f78bea1a15bb8

SHA256: 1740c8327e8d67a82a0d5b66ff2e6912fa95bf420790e105b20d6afc4028ae8c
v2.0.2.8-2.0.2.8_canary_2017-09-20
2017-09-20 13:05:42 +02:00
Kenneth Skovhede b80d0c5279 Bugfix for --accept-any-ssl-certificate.
It turns out that the `ServicePointManager` does not carry the call context when executing the request.
The workaround for now is to look at all registered validators and use them all combined when using custom SSL certificate validation.
2017-09-20 12:11:30 +02:00