Commit Graph
54 Commits
Author SHA1 Message Date
Sean Templeton b02b19e683 Change Put method name to PutAsync 2019-03-17 18:28:45 -05:00
Sean Templeton 0c122ff550 Change IBackend and IStreamingBackend to return Task for Put() 2019-03-03 21:43:10 -06:00
Kenneth Hsu 8dd3aeaf26 Use invariant culture in calls to ToLower and ToUpper. 2018-12-11 21:21:07 -08:00
Kenneth Hsu 0143a848f5 Remove unnecessary local variable. 2018-11-21 21:21:38 -08:00
Kenneth Hsu de9750caba Use 'this' keyword to improve readability. 2018-11-21 21:03:09 -08:00
Kenneth Hsu 609c32feb2 Create parent directories as needed for SFTP backend.
If the user specifies a path with multiple directories that do not
exist, the SftpClient.CreateDirectory method does not create all the
missing parent directories.  As such, we have to do so ourselves.

This addresses issue #2080.
2018-11-21 20:38:36 -08: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
Kenneth Hsu 0d23302220 Use ordinal case-insensitive comparison instead of ToLower. 2018-09-19 15:21:59 -07:00
Kenneth SkovhedeandGitHub 3b6c2b61d5 Merge pull request #3242 from warwickmm/remove_ineffective_statements
Remove ineffective statements
2018-06-04 10:40:32 +02:00
Kenneth Hsu bbe65f9dfb Remove ineffective statements.
The removed code was introduced in revision ba58651e5a ("Fix for
CreateFolder with SSH"), presumably to fix an issue where some SSH
backends did not like the trailing slash when creating new folders.
However, since we are not using the output argument of the call to
Substring, these statements have no effect.
2018-05-26 10:36:50 -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 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 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
Kenneth Skovhede 6cc70c7ae5 Added a friendly error message if the SSH key fails to parse/load.
This fixes #2856
2017-11-19 17:28:51 +01: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 5970562022 Bugfix: better error message when there is no password for SSH backend 2017-09-23 00:15:53 +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 81d5b77c8e Added extra options to SSH that exposes the operation timeout and keep-alive properties. 2017-08-06 17:48:09 +02:00
Kenneth Skovhede 4c1ea6d614 Removed custom handling of the SSH fingerprints.
This fixes #2109
2016-12-03 15:16:06 +01:00
Kenneth Skovhede b69af94b3c Fixed an issue where the --ssh-accept-any-fingerprint option would cause a warning stating that it was not supported. 2016-10-13 23:21:01 +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 f3572892be Changed SSH backend to report invalid host keys via the HostKeyException 2016-08-30 10:00:48 +02:00
Max 4960fd4202 merge upstream 2016-06-28 19:52:28 +02:00
Max 9f0b3a0042 default behavior is that fingerprint needs to be specified, but can be overided 2016-06-27 19:57:36 +02:00
Max e53f5808d9 add ability to check server fingerprint 2016-06-24 15:03:08 +02:00
Max 300ef96800 fix 1341 2016-06-11 22:11:33 +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 290fde1f9b Bugfix from EddiVonDerAlm@1e83373 2014-11-17 12:01:11 +01:00
Malte Neumann 4a57eed9b5 Fixed a problem with canceled backups
Was an backup canceled, a restart doesn't work. The problem was that a non existing file caused an failure. This fix handles this situation for the ssh and googledocs backend.
2014-11-14 14:41:36 +01:00
Kenneth Skovhede 4702323d6c Added rename support to S3 and SSH. 2014-08-21 20:59:21 +02:00
Kenneth Skovhede 989c759374 Added keyfile as password 2014-03-18 22:17:31 +01:00
Kenneth Skovhede 457399f7f0 Correctly passing port if using password auth.
Update issue #955
Status: Fixed
2014-03-18 22:09:47 +01:00
Kenneth Skovhede 77bc47837e Feature improvements for SSH backend 2014-03-12 18:27:23 +01:00
Kenneth Skovhede 4b23403cac Added key uploader module 2014-03-12 16:45:54 +01:00
Kenneth Skovhede 41ba7e386e Added a DSA + RSA SSH keygen module for web use
Added option to read url encoded key files.
2014-03-12 01:43:47 +01: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 9f4f917a1a Reintegrated 2.0 - trunk is now 2.0
git-svn-id: https://duplicati.googlecode.com/svn/trunk@1076 59da171f-624f-0410-aa54-27559c288bec
2011-12-16 19:40:50 +00:00