Commit Graph
78 Commits
Author SHA1 Message Date
Kenneth Skovhede 40dd3c6816 Updated all license mentions to MIT 2024-02-28 15:45:30 +01:00
Kenneth Hsu de2a651763 Fix bug in PutAsync implementations.
Without await, the using statement can dispose the Stream before the
call to PutAsync completes, resulting in an ObjectDisposedException.

This fixes #4556.
2021-06-12 15:12:13 -07:00
Kenneth Hsu 179a99c00c Remove unused property. 2019-05-26 19:47:03 -07:00
Kenneth Hsu 6b4cae3ea4 Disable warning about unused class. 2019-05-26 19:46:47 -07:00
Sean Templeton b02b19e683 Change Put method name to PutAsync 2019-03-17 18:28:45 -05:00
Sean Templeton 9a42eca1d6 Update FTP and Jottacloud backends for async Put 2019-03-05 21:08:25 -06:00
Sean Templeton 0c122ff550 Change IBackend and IStreamingBackend to return Task for Put() 2019-03-03 21:43:10 -06: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 d4d1945faf Use utility method to append trailing slash.
This removes some duplicated code.
2018-09-22 10:19:45 -07:00
verhoek dafee2b455 Removed unwanted character in setting passive mode. 2018-07-17 21:35:55 +02:00
verhoek 2e4a395402 Braces. 2018-06-28 23:18:18 +02:00
verhoek 470b83c416 Remove lambda. 2018-06-28 23:16:28 +02:00
verhoek 2bcc372d0a Simplified passivemode setting. 2018-06-28 23:10:35 +02:00
verhoek 65b3df52f2 Tidying up. 2018-06-28 21:07:23 +02: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
Tyler Gill dcc9faea31 Make sure HandleListExceptions(Func) calls HandleListExceptions(Action). 2017-10-14 09:17:19 -06:00
Tyler Gill b3a3911d98 Change from wrapping yield returning methods with methods that do a try/catch, since they don't work due to lazy evaluation. 2017-09-25 23:19:31 -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 Skovhede 55e230ff49 Reworked the way the AllowWriteBuffering flag is set to fix errors caused by ContentLength not being set. 2017-05-17 10:59:07 +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 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 3149064cde Merge branch 'no_more_resx' 2015-01-20 21:45:54 +01:00
Kenneth Skovhede 8d13e698eb Updated copyright notices 2015-01-20 21:44:52 +01:00
Kenneth Skovhede 16c791f0b5 Removed all resx files, now using Duplicati.Library.Localization exclusively 2015-01-20 21:07:24 +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 f935af9968 Reworked the ReadWriteTimeout usage to avoid premature timeouts on Mono 2014-07-11 01:07:48 +02:00
Kenneth Skovhede d3f4058057 Fixed various minor issues with backends 2013-05-06 20:36:26 +02:00
Kenneth Skovhede e5b3f0ea93 Rewrote all backends to use the new Uri parser.
Updated the regex to be a little more forgiving.
Does not handle paths with @, like "ftp://server/@folder"
2013-05-05 23:46:00 +02:00
Kenneth Skovhede 62c75d9af9 Removed all informs code (no more 1.3.x UI) 2013-05-05 17:07:24 +02:00
Kenneth Skovhede 9d09cb473d Renamed ftp-password to auth-password and ftp-username to auth-username 2013-05-05 16:40:37 +02:00
kenneth@hexad.dk f8dc5bbafd Added the "Password" type to argument types for simplified handling of password masking.
git-svn-id: https://duplicati.googlecode.com/svn/trunk@1509 59da171f-624f-0410-aa54-27559c288bec
2013-01-22 09:28:43 +00:00
kenneth@hexad.dk c74092f8a9 Fixed some timeout/abort issues by implementing everything by hand, on top of the async methods.
Now the WebRequest.Timeout property ONLY affects the GetRequestStream() and GetResponse() methods as the documentation says it SHOULD.

git-svn-id: https://duplicati.googlecode.com/svn/trunk@1331 59da171f-624f-0410-aa54-27559c288bec
2012-06-06 12:55:48 +00:00
kenneth@hexad.dk 59da039337 Update issue #560
Status: Fixed

The domain is now set to empty instead of null

git-svn-id: https://duplicati.googlecode.com/svn/trunk@1207 59da171f-624f-0410-aa54-27559c288bec
2012-04-19 18:49:37 +00:00
kenneth@hexad.dk 577ac0b82c Fixed a bug where the FTP upload verification fails due to FTP servers returning full path rather than relative path for filename
git-svn-id: https://duplicati.googlecode.com/svn/trunk@1118 59da171f-624f-0410-aa54-27559c288bec
2012-02-03 07:30:42 +00:00
kenneth@hexad.dk 50fd449b33 Improved performance of the FTP upload by issuing a simplified LIST command.
Fixed a problem with creating folders on FTP.

git-svn-id: https://duplicati.googlecode.com/svn/trunk@1105 59da171f-624f-0410-aa54-27559c288bec
2012-01-19 19:04:56 +00:00
kenneth.skovhede@gmail.com 1048994973 Removed some unused storage of options, this fixes a connection bug in FTP, and TahoeLAFS
git-svn-id: https://duplicati.googlecode.com/svn/trunk@938 59da171f-624f-0410-aa54-27559c288bec
2011-10-19 05:42:32 +00:00
kenneth.skovhede@gmail.com 1d6235f998 Fixup for r917
git-svn-id: https://duplicati.googlecode.com/svn/trunk@919 59da171f-624f-0410-aa54-27559c288bec
2011-09-27 06:59:17 +00:00
kenneth.skovhede@gmail.com 0b8b0d44ea Update issue #392
Status: Fixed

There is now a more consistent parsing of boolean commandline parameters.

git-svn-id: https://duplicati.googlecode.com/svn/trunk@918 59da171f-624f-0410-aa54-27559c288bec
2011-09-27 05:35:49 +00:00
kenneth.skovhede@gmail.com 7ef7a98918 Update issue #251
Status: Fixed

The backend connections are now re-used.

git-svn-id: https://duplicati.googlecode.com/svn/trunk@913 59da171f-624f-0410-aa54-27559c288bec
2011-09-24 11:39:50 +00:00
kenneth.skovhede@gmail.com c518a3dd59 Fixed a reverse setting of the flag --list-verify-uploads
git-svn-id: https://duplicati.googlecode.com/svn/trunk@815 59da171f-624f-0410-aa54-27559c288bec
2011-06-26 10:22:03 +00:00
kenneth.skovhede@gmail.com b0a359fd27 Updated license text
git-svn-id: https://duplicati.googlecode.com/svn/trunk@770 59da171f-624f-0410-aa54-27559c288bec
2011-05-09 19:52:28 +00:00
kenneth.skovhede@gmail.com 579f68cbfe Update issue #406
Status: Fixed

That turned out to be a problem with Tahoe-LAFS as well.
Both are now fixed, I will put up a new preview in a few minutes.

git-svn-id: https://duplicati.googlecode.com/svn/trunk@766 59da171f-624f-0410-aa54-27559c288bec
2011-05-03 15:52:00 +00:00
kenneth.skovhede@gmail.com 3f3394af3c Update issue #383
Status: Fixed

A minor change caused SSL to be disabled for FTP, TahoeLAFS and WEBDAV unless the option was set to "--use-ssl=true".

git-svn-id: https://duplicati.googlecode.com/svn/trunk@726 59da171f-624f-0410-aa54-27559c288bec
2011-03-14 18:54:54 +00:00
kenneth.skovhede@gmail.com b149736c81 Added an option to verify uploads by issuing a list after each put.
git-svn-id: https://duplicati.googlecode.com/svn/trunk@715 59da171f-624f-0410-aa54-27559c288bec
2011-03-10 21:33:44 +00:00
kenneth.skovhede@gmail.com a478f9d155 Update issue #378
Status: Fixed

I have now added a module called http-options which can be used to
configure http options, notably the 100-Expect.

I am unsure if it will break existing installations if I disable
it by default, so it is still enabled but can be disabled by the
switch --disable-expect100-continue.

You can set this option in the GUI under "Advanced options".

git-svn-id: https://duplicati.googlecode.com/svn/trunk@713 59da171f-624f-0410-aa54-27559c288bec
2011-03-10 19:08:16 +00:00
kenneth.skovhede@gmail.com 3229cf6ee5 Update issue #302
Status: Fixed

The FTP backend now verifies the size of the uploaded files.

git-svn-id: https://duplicati.googlecode.com/svn/trunk@685 59da171f-624f-0410-aa54-27559c288bec
2011-02-06 13:37:07 +00:00