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
Kenneth Skovhede
ee64517f7d
Removed calls to Console.WriteLine as we may run somewhere without a console.
2018-05-15 11:29:08 +02:00
Tyler Gill
e7e1ccdec2
Fix auth-id hiding in MS Graph backends.
2018-04-10 10:10:19 -06:00
Kenneth Hsu
c0c29e579d
Make string comparison use ordinal (binary) sort rules.
...
This string comparison should not be culture-aware.
2018-03-28 20:49:47 -07:00
Tyler Gill
f93f9dcc5a
Add new utility class, OAuthHttpClient.
...
This class extends HttpClient and uses an OAuthHttpMessageHandler under the covers to automatically authenticate requests.
Additionally, it automatically respects the global HttpContextSettings for overall timeout, read/write timeout, and SSL certificate validation.
(BufferRequests isn't currently handled, as HttpClient doesn't seem to easily expose that flag, and as of .NET 4.5, seems to not buffer by default.)
2018-03-23 15:07:51 -06:00
Tyler Gill
407bead9f9
Change some fragment settings.
...
Default retry delay is now 1000ms, and fragment sizes must be at least the multiple size (320 KiB)
2018-03-23 15:04:23 -06:00
Tyler Gill
5a4d170165
Update strings for Microsoft Group backend.
2018-03-23 15:03:04 -06:00
Tyler Gill
448577f5ff
Handle cases where the SharePoint path is given with an 'https' prefix in the UI.
2018-03-22 16:15:09 -06:00
Tyler Gill
7491da2add
Add entry for --group-email so it isn't treated as an unknown property.
2018-03-22 16:14:42 -06:00
Tyler Gill
5bec41b665
Update both SharePoint and Office 365 group backends to support more human-discernable methods of specifying the backend destination.
...
For SharePoint, this means instead of giving the site ID as a parameter (and a relative path as the backup URL), the full URL to the folder in SharePoint (e.g., 'sharepoint://{tenant}.sharepoint.com/{PathToSite}/{DocumentBase}/{subfolder}') can be given, and the site ID will be looked up.
(This should match the existing SharePoint backend, including the convention of using '//' to indicate the document root, though I can't explicitly test that since the SharePoint sites I have access to require 2FA, which the old backend doesn't support.)
I've tested both explicit ID and site path methods of specifying the destination, and they appear to be working.
For Office 365 groups, it now supports looking up a group by its email address.
2018-03-22 15:20:17 -06:00
Tyler Gill
987cda7e1d
When uploading large files, MS graph backends need to parse the response inside the try block for retries to work (since that is where errors are thrown)
2018-03-22 14:41:19 -06:00
Tyler Gill
258799266e
SharePoint and Group drives appear to report quota info that is all zeros.
...
In that case, pretend that no quota info was reported instead of causing incorrect quota warnings and errors.
2018-03-22 14:40:37 -06:00
Tyler Gill
438c84f824
Ensure custom fragment sizes fit the recommended sizes (under 60 MiB and multiple of 320 KiB)
2018-03-21 11:32:41 -06:00
Tyler Gill
55c182b946
Strip authorization header and access token out of Microsoft Graph exception messages.
2018-03-21 11:16:27 -06:00
Tyler Gill
6c05da925e
Explicitly request the 'replace' conflict resolution behavior when uploading large files.
2018-03-20 15:28:57 -06:00
Tyler Gill
dbb28c5f62
Make sure DNS names reported by Microsoft Graph backends are unique.
2018-03-20 15:26:52 -06:00
Tyler Gill
c57d7e75cd
Add helpId parameter to UserInformationExceptions in MicrosoftGraphBackends.
2018-03-20 15:09:06 -06:00
Tyler Gill
94341a640d
Implement DNSName method in MicrosoftGraphBackend base class.
2018-03-20 15:08:30 -06:00
Tyler Gill
f4c6100873
Add Duplicati + version as the user agent in the MS Graph backends.
2018-03-20 15:07:46 -06:00
Tyler Gill
4578a5bd91
Merge branch 'master' of https://github.com/duplicati/duplicati into feature/ms-graph-backends
2018-03-20 14:24:48 -06:00
Tyler Gill
a98c967f70
Add new backends for OneDrive+OneDrive for Business, SharePoint, and Microsoft Groups based on the Microsoft Graph API.
...
These backends are implemented via the common base class, MicrosoftGraphBackend, with only a few minor tweaks (different id parameters, protocol keys, descriptions, etc.)
All three backends support streaming, quota retrieval, and rename.
2018-03-20 14:18:49 -06:00
Tyler Gill
c542d65997
Update service agreement and privacy policy link for OneDrive backend.
2018-03-20 14:01:28 -06:00