Kenneth Skovhede
40dd3c6816
Updated all license mentions to MIT
2024-02-28 15:45:30 +01:00
gpatel-fr
cf17f488d1
update Newtonsoft lib to 13.02
2023-03-24 23:17:11 +01:00
Tyler Gill
b64c2f1df0
Move Retry-After logic to RetryAfterHelper to make it easier for other backends to incorporate it.
2021-03-23 17:28:39 -06:00
Tyler Gill
dadd30380c
Add some logging to Microsoft Graph backends.
2021-03-23 17:08:58 -06:00
Tyler Gill
06c28387d5
Address some more feedback
2021-03-20 16:09:23 -06:00
Tyler Gill
9a4632d551
Remove SubStream and add functionality to ReadLimitLengthStream. Switch to using that.
...
Also add some hardening around the Position and make sure the stream starts at relative Position 0.
2021-03-17 20:37:46 -06:00
Tyler Gill
b0793d3e49
Refactor the Retry-After logic. Now it tracks Retry-After headers on all requests, and blocks any future requests until the time from the prior request has passed.
2021-03-16 11:40:38 -06:00
Tyler Gill
7894152489
A few more improvements to the MicrosoftGraphBackends.
...
First, when performing an upload using an upload session, data is streamed directly from the input stream to the request stream. (It is no longer read into an intermediate buffer first.)
Hopefully this will help these uploads respond to throttling behavior better.
Second, these backends now check for and respect a Retry-After header if it is present.
On 5xx errors, the existing exponential backoff is used for the intermediate retries.
A few other minor things have also been cleaned up (e.g., using Task.Delay instead of Thread.Sleep)
2021-03-15 18:04:39 -06:00
Kenneth Hsu
e964072690
Target .NET Framework 4.7.1.
...
This updates all projects to target .NET Framework 4.7.1. The
TencentCOS and Tardigrade backends depend on .NET Standard 2.0. When a
.NET Framework prior to 4.7.1 is targeted, the system cannot be sure
that all the dependencies exist, so it copies all dependent assemblies
to the output directory. This causes many assemblies from the System
namespace to become bundled in the release.
https://stackoverflow.com/a/48875007
We had previously attempted to make individual projects target 4.7.1
(see pull request #4242 ), but this can cause compatibility issues when
4.6.2 projects depend on 4.7.1. projects.
This will require Mono 5.10.0 or greater (previously, we required 5.0.0
or greater).
https://www.mono-project.com/docs/about-mono/releases/5.10.0/#class-libraries
This fixes issue #4234 .
2020-07-26 19:46:01 -07:00
Tyler Gill
e742205f65
Add --use-http-client=false parameter to backends based on Microsoft Graph APIs (OneDrive v2, SharePoint v2, etc.) to make them use the OAuthHelper and HttpWebRequest infra used by most / all other backends for HTTP requests. This lives in parallel to the original implementation that uses the OAuthHttpClient class, but is intended to see if this prevents the memory leaks and problems seen in some versions of Mono when using the OneDrive v2 backend.
2020-03-23 14:10:40 -06:00
Kenneth Hsu
48444782c2
Fix regression with SharePoint backend.
...
In pull request #3989 , we set the conflict resolution behavior for
creating new items to be "Replace". While this worked for OneDrive,
SharePoint apparently is case-sensitive and expects "replace". Since
the default behavior is to replace, we will simply remove the
specification to avoid possible conflicts.
See the forum discussion below:
https://forum.duplicati.com/t/bad-request-error-from-request-nameconflictbehavior-must-be-fail-replace-or-rename/8578
2019-12-07 12:19:21 -08:00
Tyler Gill
5364345edd
Add ConfigureAwait(false) to MSGraph backends' awaits.
2019-11-14 07:51:49 -07:00
Tyler Gill
e9543142f2
Explicitly dispose request messages, request contents, and response messages
2019-11-13 12:18:19 -07:00
BlueBlock
c7005ca95b
remove system.net nuget packages
...
we should rely on the system.net packages on the system
2019-08-04 15:33:56 -04:00
BlueBlock
815e30b63b
update csproj toolverion and nuget packages
2019-07-31 13:20:03 -04:00
BlueBlock
08a1e9998a
initial upgrade to framework 4.6.2
...
- no code changes except those noted below
- projects upgrade to 4.6.2
- wixinstaller project upgraded automatically by VisualStudio
- wixinstaller updated to require 4.6.2
- Library.Encryption changed to Standard2.0 so accommodate update to SharpAesCrypt
2019-07-26 09:18:16 -04:00
Kenneth Hsu
988c445233
Provide cancellation token to async methods.
2019-05-26 14:55:31 -07:00
Sean Templeton
b02b19e683
Change Put method name to PutAsync
2019-03-17 18:28:45 -05:00
Sean Templeton
8bd4b825c8
Fix several Codacy issues
2019-03-13 21:51:05 -05:00
Sean Templeton
13f83a22a1
Update Mega, OneDrive, and Rclone backends for async Put
2019-03-05 21:25:29 -06:00
Sean Templeton
0c122ff550
Change IBackend and IStreamingBackend to return Task for Put()
2019-03-03 21:43:10 -06:00
Kenneth Skovhede
968261056e
Merge branch 'feature/remove_onedrive_v1'
...
# Conflicts:
# Duplicati/Library/Backend/OneDrive/OneDrive.cs
2018-11-12 13:02:18 +01:00
Kenneth Skovhede
4c1d53f283
Removed the OneDrive v1 backend as it no longer works
2018-11-08 12:46:29 +01:00
verhoek
72b1f6b6f8
Updated project files.
2018-11-02 22:45:07 +01:00
verhoek
b2cc18426c
Renamed Library.IO to Library.Common.IO.
...
Moved basic Platform functions to Library.Common.Platform.
Turned IO_OS into property within Library.Common.
2018-11-02 21:34:07 +01:00
verhoek
71c6aca8a7
Fixed IO calls in Filebackend.
...
Moved FileEntry to Library.IO due to AlphaFS not implementing
System.IO.FileInfo/DirectoryInfo.
2018-11-01 17:56:48 +01:00
verhoek
4d8155fa43
Merge remote-tracking branch 'origin/master' into issue/3311
2018-10-29 12:13:25 +01:00
Kenneth Hsu
a567b467dc
Fix slashes in Microsoft Graph URLs.
...
This fixes an issue introduced in revision f9022fec ("Avoid referencing
virtual members in constructor").
This addresses issue #3460 .
2018-10-27 13:03:25 -07:00
verhoek
bc053df294
Moved basic IO helper functions to Library.IO.
2018-10-27 12:17:07 +02:00
Kenneth Hsu
9e0b031fee
Remove unused members.
2018-10-15 21:20:30 -07:00
Kenneth Hsu
9374d6b208
Move comments and remove invalid XML tags.
...
The comment was not placed before a valid language element.
2018-10-13 20:52:30 -07:00
Kenneth Hsu
914b35e342
Escape characters in XML documentation.
2018-10-13 20:52:15 -07:00
Kenneth Hsu
8bb770964d
Constrain generic type to be a class to allow for null comparison.
...
The SendRequest method performs a comparison between an object of type T
and null. While there are no use cases currently where the generic type
is a value type, we should constrain the generic type to be a class so
that the comparison remains meaningful.
2018-10-08 19:13:23 -07:00
Kenneth Hsu
6c08f44394
Revert "Avoid potential comparison of value type with null."
...
This reverts commit ecb670a2d9 .
While there aren't any cases where the generic type is a struct, the
comparison with default(T) is incorrect. If T is int, we wouldn't want
the behavior to differ based on whether the value was zero or nonzero.
2018-10-08 18:54:36 -07:00
Kenneth Hsu
ecb670a2d9
Avoid potential comparison of value type with null.
...
While there aren't currently any cases where the generic type is a value
type, this will make the code slightly more robust to future
implementations.
2018-10-07 09:59:13 -07:00
Kenneth Hsu
e2bc85c7e4
Merge remote-tracking branch 'upstream/master' into constructor_virtual_members
...
Resolved Conflicts:
Duplicati/Library/Backend/OneDrive/MicrosoftGraphBackend.cs
2018-10-01 17:15:58 -07:00
Rune Henriksen and GitHub
5f4236cbc2
Merge pull request #3399 from duplicati/remove_unused_variables_assignments
...
Remove unused variables, fields, and unnecessary assignments
2018-10-01 23:19:37 +02:00
Kenneth Hsu
024bc5bea2
Mark immutable field as readonly.
2018-09-30 15:45:42 -07:00
Kenneth Hsu
ee14862db5
Add comment to clarify use of Lazy.
2018-09-30 15:06:55 -07:00
Kenneth Hsu
f59607d94d
Rename property.
2018-09-30 15:06:55 -07:00
Kenneth Hsu
f9022fec66
Avoid referencing virtual members in constructor.
...
Since the call to GetRootPathFromUrl may be expensive, we cache the
value using a lazy initializer.
2018-09-30 15:06:49 -07:00
Kenneth Hsu
7cf830cad7
Provide protocol key to MicrosoftGraphBackend constructor.
...
This will help us avoid referencing virtual members in the constructor.
2018-09-30 10:59:26 -07:00
Kenneth Hsu
6215fe1ac5
Extract string to private constant.
...
This will allow us to provide the string as a parameter to the parent
class constructor to avoid referencing virtual members in the
constructor.
2018-09-30 10:56:59 -07:00
Kenneth Hsu
9ce1e807c7
Remove unused variables and fields.
2018-09-29 10:41:27 -07:00
Kenneth Hsu
44b7c29489
Rename local variable to avoid hiding class field.
2018-09-28 20:57:44 -07:00
Kenneth Hsu
d4d1945faf
Use utility method to append trailing slash.
...
This removes some duplicated code.
2018-09-22 10:19:45 -07:00
Kenneth Skovhede and GitHub
66e5dfe722
Merge pull request #3237 from tygill/fix/msgraph-delete-error
...
(MS Graph) When the delete operation fails due to a 'file not found' error, we don't need to bubble up an exception
2018-06-04 10:41:16 +02:00
Tyler Gill
f2f5d4c0a6
Change from swallowing delete errors to wrapping DriveItemNotFoundException in FileMissingException.
...
This way, the regular backend manager logic can handle and log the delete of a non-existant file.
Also update some of the other operations to throw FileMissingException (rather than the backend specific DriveItemNotFoundException).
2018-06-02 15:52:20 -06: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
Tyler Gill
8131e85581
(MS Graph) When the delete operation fails due to a 'file not found' error, we don't need to bubble up an exception.
2018-05-25 09:18:20 -06:00