Commit Graph
79 Commits
Author SHA1 Message Date
drwtsn32x 8f9ec70680 only warn if delete failure is confirmed 2019-11-19 20:28:14 -08:00
Kenneth SkovhedeandGitHub 99d0cb3c57 Merge pull request #3953 from warwickmm/make_fields_readonly
Mark fields that don't need to be reassigned as readonly
2019-10-21 08:36:17 +02:00
Kenneth Hsu 2aa76881a5 Mark fields that don't need to be reassigned as readonly.
This makes it explicit at compile-time that these fields should not be
reassigned outside the constructor.
2019-10-19 13:59:22 -07:00
Kenneth Hsu afab61a05b Use pattern matching to simplify casts. 2019-10-19 10:15:38 -07:00
Kenneth Hsu b6123cc156 Ensure that IndexVolumeWriter is disposed. 2019-09-28 10:33:34 -07:00
Sean Templeton b02b19e683 Change Put method name to PutAsync 2019-03-17 18:28:45 -05:00
Sean Templeton 0c122ff550 Change IBackend and IStreamingBackend to return Task for Put() 2019-03-03 21:43:10 -06:00
Kenneth Hsu b7f28aa9f9 Remove empty finally blocks.
Empty finally blocks serve no purpose.  In cases where no exceptions are
caught, we removed the try as well.
2018-12-31 14:00:43 -08:00
Kenneth Hsu 1d57ddd5a6 Flatten AggregateExceptions before referencing InnerException.
The InnerException property of an AggregateException can be another
AggregateException.  By calling Flatten(), we remove inner
AggregateExceptions so that the InnerExceptions property contains all
the original exceptions.  The InnerException property is the first
element of InnerExceptions.
2018-10-13 19:07:49 -07:00
Rune HenriksenandGitHub be7edb580d Merge pull request #3410 from warwickmm/simplify_enumerating_collections
Simplify enumeration of collections
2018-10-07 19:06:28 +02:00
Kenneth Hsu 0c1ac9c489 Replace chained LINQ calls with call to overload with predicate.
This simplifies the code by reducing the number of enumerators created
while also making the code slightly more readable.
2018-10-06 16:20:18 -07:00
Kenneth Hsu d72128ec83 Remove unused method parameters. 2018-10-06 15:09:43 -07:00
Kenneth Hsu 8902da39f2 Undo removal of method parameters.
This should be done on a separate branch for a different pull request.
2018-09-29 10:44:05 -07:00
Kenneth Hsu 9ce1e807c7 Remove unused variables and fields. 2018-09-29 10:41:27 -07:00
Kenneth Hsu f12858e6a5 Mark fields that shouldn't be reassigned as readonly.
This makes it explicit at compile-time that these fields should not be
reassigned outside the constructor.
2018-05-25 10:04:52 -07:00
Kenneth Skovhede 9e48de8e01 Merge branch 'master' of github.com:duplicati/duplicati 2018-03-22 08:32:48 +01:00
Kenneth Skovhede e9d477889f Fixed the order of arguments for throttling downloads.
This fixes part of #2890
2018-03-22 08:32:33 +01:00
Kenneth Hsu c00c6fd19b Make fields containing lock objects readonly.
If one of these fields is accidentally reassigned, it's possible for
threads to be oblivious to an existing lock.  By making the fields
readonly, we will be notified at compile-time if we inadvertently
redefine one of these fields.
2018-03-17 19:59:23 -07:00
Kenneth Skovhede 842fd96543 Implemented a new logging system that is more transparent and allows a more granular way of picking log messages.
Added ID's to each log message and each exception to allow later introduction of a Knowledgebase service that explains each error in more detail.
2018-03-15 09:12:34 +01:00
Kenneth Skovhede bd863016fa Added support for returning multiple DNS names for cache invalidation.
Updated most backends to return the actual DNS names for cache invalidation.
2018-02-26 11:37:10 +01:00
Rune Henriksen fc77b476fc changed from NYI to null returns. Added check to skip DNS check if no DNSName is provided 2018-02-21 22:38:01 +01:00
Rune Henriksen 0ba28da948 Added if statement to specifically verify that it's a NameResolutionFailure and not just a WebException 2018-02-20 20:34:09 +01:00
Rune Henriksen ecc586c0f8 added code to attempt to resolve DNS issues on connection failure and implemented DNSName method in WebDav backend handler 2018-02-18 01:30:05 +01:00
vnau 62a7901aca Compression modules refactored to work with streams instead of filenames;
Added unit test to check compression reversibility
2017-12-25 04:12:19 +07:00
Kenneth Hsu 5fb1958ceb Remove redundant calls to ToString. 2017-11-26 15:44:34 -08:00
Kenneth Skovhede 8bbe04f623 Fixed a case where entering an invalid value for the --number-of-retries or --retry-delay options would crash the uploader thread and bring down the server.
This fixes #2834
2017-10-30 16:12:44 +01: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 Skovhede 6d401fbd8d Changed all hash algorithms to use the Cng version.
This fixes #2621
2017-09-20 09:58:43 +02:00
Kenneth Skovhede 37527b51ba Fixed removing temporary files downloaded for testing purposes. 2017-09-19 11:20:26 +02:00
Tyler Gill 83a1dcfb64 Replace all instances of InvariantCultureIgnoreCase with OrdinalIgnoreCase in string comparisons.
InvariantCulture is useful when comparing / sorting human language strings in a culturely correct way. It handles things like accented letters in a way that makes sense to humans (e.g., 'a' should be sorted next to 'á', rather than after 'z').
Ordinal looks just at the raw code points of the characters. As such, it is recommended for use in cases when comparing system strings (file paths, command line parameters, config settings, etc.). Since it doesn't need to use the culture specific sorting rules, this method can often be faster.

For more information, see https://stackoverflow.com/questions/492799/difference-between-invariantculture-and-ordinal-string-comparison (and other related questions)
2017-09-18 23:55:08 -06:00
Kenneth Skovhede 4a6bf3deba Added "DeleteGraceTime" to all files deleted from the backend mananger.
This should fix a number of cases where the backup returns a consistency error because the deletion and the backend check happens before the backend is in sync.
2017-09-18 11:53:50 +02:00
Kenneth Skovhede 11f7660939 Implemented logic to report if the backend is blocking the operation. 2017-09-04 12:15:47 +02:00
Kenneth Skovhede da0de9983b Implemented the live throttle control.
This fixes #1730
This fixes #1261
2017-06-20 13:00:52 +02:00
Kenneth Skovhede 33ea12b7fe Added some readonly flags to signal non-changing variables 2017-03-03 20:50:36 +01:00
Kenneth Skovhede 9894facd51 Improved the logic around the abort functionality to avoid hanging while performing a retry delay 2017-02-14 10:28:59 +01:00
Kenneth Skovhede a029890409 Implemented better default error messsages 2017-01-09 11:35:38 +01:00
Kenneth Skovhede 4bf4871427 Added commandline operation to purge select files from filesets.
This fixes #1009.
This paves the way for #1337.
2016-12-29 22:41:13 +01:00
AndersGron b008a54302 Fix use of null object
Fix use of null object
2016-10-16 22:02:55 +02:00
Kenneth Skovhede 0c68daff6c Fixed all whitespace to be 4 spaces instead of tabs 2016-09-15 11:39:27 +02:00
Kenneth Skovhede dd1c5841f4 Added fix to prevent full backend url from being reported in the error message 2016-04-18 12:03:51 +02:00
FootStark eeefe39e9b Fix wrong stream closed 2016-03-23 14:51:58 +01:00
Kenneth Skovhede eea33a7649 Enabled streaming and multithreading in encryption by default 2016-03-19 22:27:46 +01:00
FootStark f8c7b0ce2c Renamed option for beta
Renamed option 'enable-piped-downstreams' --> 'enable-piped-streaming'
to generalize for uploads
2016-03-17 19:53:51 +01:00
FootStark 7656e891ce Prepocessor for schema, Optimized RemoveRemoteVolume
Added a preprocessor for schema supporting sqlite_version-dependent
Statements
RemoveRemoteVolume deletes volumes in batch.
2016-03-16 00:49:28 +01:00
Kenneth Skovhede d3fcffb845 Bugfix for an error message 2016-03-10 21:51:45 +01:00
FootStark fbeff5e46d final bugfixing and a little cleanup 2016-03-02 23:01:38 +01:00
FootStark fa76c3e0e0 Added experimental download piping
Incorporates Hash-calculation into stream stack for classic download mode (better performance)
Offers new experimental download mode where hashing and decryption are piped to different threads.
2016-02-28 21:39:36 +01:00
FootStark 454b6e2bf3 Fix double Hash computation on download 2016-02-18 19:42:45 +01:00
Kenneth Skovhede 9bfc39120a Improved handling the compaction process with errors, such that deletes are marked and commited to the database before actually being deleted, causing fewer issues when resuming the operation afterwards. 2015-11-17 21:32:55 +01:00
Kenneth Skovhede 70892e8e64 Improved handling for cases where a delete request returns a FileNotFound exception 2015-11-17 12:36:00 +01:00