Commit Graph
33 Commits
Author SHA1 Message Date
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 00292953c3 added DNSName getter on Backend interface and added NotImplementedException methods on each backend class 2018-02-18 00:18:44 +01:00
Kenneth Hsu 8810e0130d Make string comparisons use ordinal (binary) sort rules.
These string comparisons should not be culture-aware.
2017-11-26 11:19:54 -08:00
Kenneth Hsu 3d51e9153b Avoid signing assemblies.
Using strong-named assemblies can cause difficulties with the GNU LGPL
license, which allows for one to recombine or relink their application
with modified versions of the code.  While one solution is to share the
private key so that people can sign the assemblies themselves, this
would break the trust that is expected from signed assemblies.  For now,
the easiest fix is to simply not sign the assemblies.  Note that by
doing so, we prevent the code from being referenced from other signed
assemblies.

This also fixes an issue introduced in revision ba94d36a80 ("Added
auto-update for WindowsService and Service."), where the WindowsService
project (signed) referenced the AutoUpdater project (not signed).

We also removed instances of <SignAssembly>false</SignAssembly> to be
consistent with newly created .csproj files that do not contain the
SignAssembly element.

This was motivated by the discussion in issue #2814.
2017-10-15 22:00:23 -07: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 a06f38442a Updated all Newtonsoft.Json packages 2017-09-23 00:25:50 +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 046b522a8d Updated NewtonSoft.Json 2017-05-17 11:08:51 +02:00
Kenneth Skovhede 5068e51ea7 Fixed the buffer avoidance flag for Delete in AMZCD. 2017-05-17 10:59:47 +02:00
Kenneth Skovhede 015a92343f Avoids inserting delays if the same operation is performed repeatedly on AMZCD.
This should help with #1893
2017-04-21 12:55:29 +02:00
Kenneth Skovhede a029890409 Implemented better default error messsages 2017-01-09 11:35:38 +01:00
Kenneth Skovhede 52eb8e8478 Disabled MSBuild for much faster builds on MacOS 2016-12-29 23:12:41 +01:00
AndersGron 5a03d65b97 Refactoring amazon cloud drive consistency delay
Refactoring amazon cloud drive consistency delay
2016-10-17 21:22:22 +02:00
AndersGron cf3c567144 Amazon cloud drive consistency delay
Use delay for Delete, Rename, GetCurrentDirectory and Get. Calculate the
delay from the completion of the operations instead of the start. I have
no idea if this is correct or not, but it seems to fix my issues with
consistency.
2016-10-16 22:07:32 +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 bde606ae60 Updated packages 2016-06-27 15:30:25 +02:00
Kenneth Skovhede 3005594b38 Merge branch 'master' into nuget_setup
# Conflicts:
#	Duplicati/GUI/Duplicati.GUI.TrayIcon/Duplicati.GUI.TrayIcon.csproj
#	Duplicati/Library/Backend/S3/Duplicati.Library.Backend.S3.csproj
#	Duplicati/Library/Backend/S3/S3Wrapper.cs
#	thirdparty/CoCoL/CoCoL.dll
#	thirdparty/SSH.NET/Renci.SshNet.dll
2016-06-27 15:25:52 +02:00
Xelio Cheong 62653c74f1 Fix the escaping of special characters of Amazon Cloud Drive API filtering
For filtering parameters, prepend \ to special characters + - & | ! ( ) { } [ ] ^ ' " ~ * ? : \ and space according to Amazon Cloud Drive API documentation, and encode space as %20 instead of + to avoid mistaking space as plus sign in filtering parameter.

Amazon Cloud Drive API documentation on escaping special characters of filtering parameters:
https://developer.amazon.com/public/apis/experience/cloud-drive/content/nodes#Filtering
2016-05-21 18:40:09 +08:00
Kenneth Skovhede 5f7e63ae78 Fixed the timeout issue 2016-04-16 17:51:44 +02:00
Kenneth Skovhede d0711011a2 Rewrote all WebRequest code to use AsyncHttpRequest, and normalized usage such that WebResponse objects are always correctly disposed. 2016-04-16 11:12:28 +02:00
Kenneth Skovhede 848dd7c85d Fixed a few issues where reporting the error message would cause an exception that masks the real error 2016-04-13 10:54:29 +02:00
Kenneth Skovhede 785c4d325f Reverted changes to solution file so it again forces Windows linefeeds.
This also moved stuff around in some project files.
2016-04-13 00:36:22 +02:00
Kenneth Skovhede 2542824361 Merge branch 'master' into nuget_setup
# Conflicts:
#	thirdparty/SharpAESCrypt/SharpAESCrypt.exe
2016-03-13 22:20:57 +01:00
Kenneth Skovhede 997ffca114 Implemented a list delay to work around the eventually consistent issue.
This fixes #1546
2016-03-13 18:01:01 +01:00
Kenneth Skovhede 1ff57b5578 Fixed an issue with Amazon Cloud Drive where deleted files were put in the root folder instead of being deleted.
Actually files cannot be deleted on Amazon Cloud Drive, but now they are put into trash instead of being put into the root folder.
This improves issue #1546
2016-03-13 17:25:05 +01:00
Kenneth Skovhede 59cc0005a3 Removed unused references and updated most libraries to come from NuGet sources instead of being provided in the thirdparty library 2016-01-29 10:47:39 +01:00
Kenneth Skovhede 766458da9b Removed unused variable 2016-01-12 09:52:30 +01:00
Kenneth Skovhede 97f2813066 Reset version number 2015-12-07 22:09:07 +01:00
Kenneth Skovhede 98dc741dbd Minor cleanup for amzcd, and switched to the new multi-part upload method 2015-12-07 09:53:47 +01:00
Kenneth Skovhede 1708dfd581 Optimization for AmzCD: don't load files unless required. 2015-12-05 14:21:21 +01:00
Kenneth Skovhede 27c697eec6 Added Amazon Cloud Drive backend as requested in issue #598 2015-12-05 11:25:26 +01:00