Commit Graph
2357 Commits
Author SHA1 Message Date
Kenneth SkovhedeandGitHub 1df44989d2 Update LocalListChangesDatabase.cs
Fixed issue with filters and ListCchanges / Compare
2017-10-03 11:08:43 +02:00
Daniel Radünz ed5daa60b5 Simplified code by removing one loop 2017-09-30 22:05:54 +02:00
Daniel Radünz 4e3d5d3e81 Fixed typo in option name 2017-09-30 22:05:54 +02:00
Daniel Radünz 28ad1e1bbd Better example in option description 2017-09-30 22:05:30 +02:00
Daniel Radünz 0a4a6edca1 Renamed all occurrences of "staggered version" to "retention policy" 2017-09-30 22:05:30 +02:00
Daniel Radünz 7b176e4dc2 Check validity of keep-staggered-versions option value 2017-09-30 22:05:30 +02:00
Daniel Radünz be19329d7f Compact if new the option is used 2017-09-30 22:05:29 +02:00
Daniel Radünz 04b7bf38c3 Reworded option description and added example 2017-09-30 22:05:29 +02:00
Daniel Radünz 40db42b29b Moved code related to deciding which backups to delete from Options into the DeleteHandler
Added logging
2017-09-30 22:05:29 +02:00
Daniel Radünz 3ec1fabc57 initial commit of staggered versioning feature 2017-09-30 12:07:02 +02:00
Kenneth Hsu 6abe087c18 Use helper method to get unique items and duplicates. 2017-09-28 21:55:15 -07:00
Kenneth Hsu 146f4aaa5b Use helper method to get unique items and duplicates. 2017-09-28 21:48:38 -07:00
Kenneth SkovhedeandGitHub 33314ce7c9 Merge pull request #2763 from tygill/fix/list-ienumerable
Change IBackend.List() to return IEnumerable instead of List
2017-09-28 11:06:41 +02:00
Kenneth SkovhedeandGitHub 1f0f73da6f Merge pull request #2772 from warwickmm/refactor/remove_string_format
Remove unnecessary call to String.Format
2017-09-28 11:00:02 +02:00
Kenneth SkovhedeandGitHub 3411d46474 Merge pull request #2773 from warwickmm/refactor/convert_if_to_switch
Convert if statements to switch statements for enums
2017-09-28 10:59:15 +02:00
Kenneth Skovhede 7ed1362e4c Merge branch 'master' into concurrent_processing
# Conflicts:
#	Duplicati/Library/Main/Operation/BackupHandler.cs
2017-09-27 09:58:29 +02:00
Kenneth Skovhede 3ceb1087a7 Merge branch 'master' of github.com:duplicati/duplicati 2017-09-27 09:55:49 +02:00
Kenneth Hsu 0738c5b624 Remove unnecessary call to String.Format. 2017-09-26 20:43:27 -07:00
Kenneth Hsu 79e0f69506 Convert if statement to switch statement.
When the comparison is performed on an enum, using a switch statement
can allow for additional compiler optimizations.
2017-09-26 20:20:14 -07:00
Kenneth Hsu 5da12a704d Convert if statement to switch statement.
When the comparison is performed on an enum, using a switch statement
can allow for additional compiler optimizations.
2017-09-26 20:13:40 -07:00
Kenneth Hsu c082b18389 Declare variable outside of if statement.
This will allow us to more easily convert the if statement to a switch
statement.
2017-09-26 20:10:19 -07:00
Kenneth Hsu 4edf8536da Remove unused argument in string formatting. 2017-09-26 19:56:29 -07:00
Kenneth Skovhede 37e42b718d Fix not shutting down backendmanager if it is required for something else.
This fixes #2759
2017-09-26 22:45:24 +02:00
Kenneth SkovhedeandGitHub 436dd7f017 Merge pull request #2761 from warwickmm/refactor/simplify_duplicate_file_check
Use simpler data structures when detecting duplicate filenames
2017-09-26 15:42:46 +02:00
Kenneth SkovhedeandGitHub a3270e4323 Merge pull request #2762 from warwickmm/improve_argument_exceptions
Improve construction of ArgumentExceptions
2017-09-26 15:42:07 +02:00
Kenneth Skovhede 9c0c5fbb97 Merge branch 'master' into concurrent_processing 2017-09-26 14:26:09 +02:00
Tyler Gill 44c53d3eb1 Merge branch 'master' of https://github.com/duplicati/duplicati into fix/list-ienumerable 2017-09-25 23:19:38 -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 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
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 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 a06f38442a Updated all Newtonsoft.Json packages 2017-09-23 00:25:50 +02:00
Tyler Gill 811acac073 Fix warning that the default-filters parameter isn't supported. 2017-09-21 23:44:24 -06:00
Kenneth Skovhede 860924bb62 Updated main functions to new CoCoL library 2017-09-20 21:03:24 +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 6d401fbd8d Changed all hash algorithms to use the Cng version.
This fixes #2621
2017-09-20 09:58:43 +02:00
Kenneth Skovhede bc6e32d049 Updated the new backend handler to support the same features as the previous: throttle, error message, and deleteGraceTime. 2017-09-19 14:24:59 +02:00
Kenneth Skovhede 21b7a98dc3 Implemented the blocking flag in the uploader 2017-09-19 14:18:54 +02:00
Kenneth Skovhede 0b81fabb1f Bugfix from the merge conflict 2017-09-19 14:18:10 +02:00
Kenneth Skovhede 0dd56f1650 Merge branch 'master' into concurrent_processing
# Conflicts:
#	Duplicati/Library/Main/Options.cs
2017-09-19 12:51:40 +02:00
Kenneth Skovhede 37527b51ba Fixed removing temporary files downloaded for testing purposes. 2017-09-19 11:20:26 +02:00
Kenneth SkovhedeandGitHub c386da0b33 Merge pull request #2741 from tygill/fix/string-compare-ordinal-ignore-case
Replace all instances of InvariantCultureIgnoreCase with OrdinalIgnoreCase
2017-09-19 11:07:20 +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
Tyler Gill 3fc4868433 Merge branch 'master' of https://github.com/duplicati/duplicati into feature/default-filters
# Conflicts:
#	Duplicati/Library/Utility/Utility.cs
2017-09-18 23:13:13 -06:00
Kenneth Skovhede c9af99016a Merge branch 'master' into concurrent_processing 2017-09-18 15:28:43 +02:00