Commit Graph
41 Commits
Author SHA1 Message Date
Kenneth SkovhedeandGitHub 9464caf622 Feature/update license 2025 (#5851)
* Fixed some minor whitespace issues

* Updated all copyright to 2025
2025-01-07 09:40:39 +01:00
Kenneth SkovhedeandGitHub 8593887184 Rename OneDrive v2 (#5795)
* Change displayname of OneDrive v2

Since OneDrive v1 is removed, there is no need to name the current backend `v2`.

* Renamed everything but the protocol key
2024-12-19 22:38:35 +01:00
Michal Naiman aed2f4d5c8 Fixes related to DNC libraries interfaces 2019-04-29 00:57:02 +02: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 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 d4d1945faf Use utility method to append trailing slash.
This removes some duplicated code.
2018-09-22 10:19:45 -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 ee64517f7d Removed calls to Console.WriteLine as we may run somewhere without a console. 2018-05-15 11:29:08 +02: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 c542d65997 Update service agreement and privacy policy link for OneDrive backend. 2018-03-20 14:01:28 -06: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
osmogar 8f1f972f09 A malfunction OneDrive account can retrieve a inconsistent list of files when we fetches a partial list of objects through the onedrive rest api. Retries the download of the file list until all files are listed 2018-01-26 14:22:32 +01:00
Kenneth SkovhedeandGitHub 36aadc4ad1 Merge pull request #2910 from warwickmm/refactor/remove_redundant_tostring
Remove redundant calls to ToString
2017-11-27 08:50:00 +01:00
Kenneth Hsu 5fb1958ceb Remove redundant calls to ToString. 2017-11-26 15:44:34 -08: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
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
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
Tyler Gill 7c3ce32ee2 Add support for the quota reporting and renaming interfaces to the OneDrive backend.
To test the quota support, quota information is reported on the command line if it is available.
However, the rename support hasn't been tested, since I don't see anything using that functionality yet.
2017-09-22 00:30:10 -06: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 0c68daff6c Fixed all whitespace to be 4 spaces instead of tabs 2016-09-15 11:39:27 +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 cb8c89d748 Fixed an issue with OneDrive not throwing the correct exceptions on FileNotFound 2015-11-17 12:35:07 +01:00
Kenneth Skovhede 1d3d24f2a4 Renamed the SkyDrive class to OneDrive. 2015-06-29 22:38:47 +02:00
Kenneth Skovhede 678f0ceb24 Fixed some file-size limits and a missing counter in OneDrive BITS transfer 2015-06-27 01:11:25 +02:00
Kenneth Skovhede 4a299c8500 Updated the OneDrive backend to use the shared OAuth library.
Updated the OneDrive backend to support BITS transfer of large files.
This closes #1222
2015-06-25 20:35:21 +02:00
Kenneth Skovhede d4b1fc55da Added paging to OneDrive file list requests, which is required to list large sets of remote files.
Implemented patch as proposed in #1299.
This closes #1299.
2015-03-06 15:29:06 +01:00
Kenneth Skovhede f08f6b5b8a Moved LC.L usage into the strings class 2015-01-20 21:39:03 +01:00
Kenneth Skovhede 738c111397 Added detection for throwing FileMissingException to all backends 2014-11-15 15:00:12 +01:00
Kenneth Skovhede 86abc7565a Added locally allocated buffers for copystream to reduce pressure on allocator 2014-11-10 18:38:18 +01:00
Kenneth Skovhede 7dc0cb2f20 Fixed using the OneDrive root folder 2014-07-25 15:48:26 +02:00
Kenneth Skovhede 0cf41f8b17 Changed the way the OneDrive authid is passed to the service, to avoid it being logged as part of the request string. 2014-07-25 15:20:36 +02:00
Kenneth Skovhede add0e9f8a7 Adjusted display names for backends 2014-07-16 23:18:37 +02:00
Kenneth Skovhede 04f09e7a1f Fixed a wrongly formatted string 2014-07-15 17:10:02 +02:00
Kenneth Skovhede 46767d7e0a Improved OneDrive error messages 2014-07-15 13:33:12 +02:00
Kenneth Skovhede e3d94ddf00 Fixed a crash with invalid strings 2014-07-14 17:05:19 +02:00
Kenneth Skovhede 86b3193fea Removed some debug code 2014-07-11 01:09:58 +02:00
Kenneth Skovhede 50c926acea Removed SkyDrive and implemented OneDrive with OAuth 2.0 logins. 2014-07-11 01:07:05 +02:00