Commit Graph
76 Commits
Author SHA1 Message Date
Kenneth Hsu afab61a05b Use pattern matching to simplify casts. 2019-10-19 10:15:38 -07:00
Kenneth Hsu 81b9e75a29 Preserve stack trace while unwrapping TargetInvocationExceptions.
If we simply throw the inner exception, the stack trace is lost.  If we
throw a new exception with the originating exception as the inner
exception, the user is not provided with any meaningful information.
2019-03-21 19:26:14 -07:00
verhoek ab12be6bbd Renamed IsClientLinux to IsClientPosix . 2018-11-03 09:26:04 +01:00
verhoek 8bb406cd15 Migrated to use the platform class. 2018-11-02 22:17:16 +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 1275f14405 Replaced DirectorySeparatorChar.ToString() calls. 2018-11-02 17:45:00 +01:00
verhoek a90f577624 Redirected GetDirectories calls to Library.IO's version. 2018-10-30 13:38:25 +01:00
verhoek bc053df294 Moved basic IO helper functions to Library.IO. 2018-10-27 12:17:07 +02:00
Rune HenriksenandGitHub be7edb580d Merge pull request #3410 from warwickmm/simplify_enumerating_collections
Simplify enumeration of collections
2018-10-07 19:06:28 +02:00
Kenneth Hsu b824c86c7e Avoid unnecessary enumeration of collections.
This improves performance by using Any() to avoid unnecessary
enumeration of collections.
2018-10-06 16:20:18 -07:00
Kenneth Hsu d72128ec83 Remove unused method parameters. 2018-10-06 15:09:43 -07:00
Kenneth SkovhedeandGitHub 7330aebaeb Merge pull request #3394 from warwickmm/remove_unnecessary_indirection
Use built-in method to expand environment variables
2018-09-28 22:25:46 +02:00
Kenneth Hsu d4692e2d35 Use built-in method to expand environment variables.
After we removed the tilde expansion in revision c9aa6cf5fb ("Avoid
performing tilde expansion"), the Utility.ExpandEnvironmentVariables
method simply called System.Environment.ExpandEnvironmentVariables.  We
can simplify the code by just referencing the built-in method directly.
2018-09-22 19:59:46 -07:00
Kenneth Hsu 1c8bb276b4 Allow tasks to complete on any thread when context is irrelevant.
When the code following the await can be executed on any thread, it's
recommended to use ConfigureAwait(false) to avoid unnecessary context
switching and potential deadlocks.
2018-09-19 16:57:17 -07:00
Kenneth Skovhede 6fcec63dea Workaround to support output redirect on Windows, and also allow passphrase input when running under the updater 2018-06-20 12:15:18 +02:00
Kenneth Skovhede f011707dba Revert "Removed redirecting of standard streams so to properly share a console."
This reverts commit 39f6065217.
2018-06-20 10:55:32 +02:00
verhoek 39f6065217 Removed redirecting of standard streams so to properly share a console.
If not, stdin is broken but needed for Console.ReadKey in for example
prompting the user for a encryption passphrase.
2018-06-12 09:26:41 +02:00
verhoek 7556c3fa63 Merge branch 'master' into feature/tempdir 2018-05-23 20:13:48 +02:00
verhoek 67c8929759 wip 2018-05-23 19:37:49 +02:00
verhoek 7bf1768f80 Implemented default tempdir for backend server. 2018-05-22 21:51:29 +02:00
verhoek 30cd41585b Corrected spelling function name. 2018-05-16 20:08:40 +02:00
Kenneth Skovhede 3a8f76e337 Fixed a problem with writing the wrong (empty) sha256 hash in the autoupdater manifest. 2018-01-18 22:57:20 +01:00
Kenneth Skovhede d9377bab7e Removed TempFileStram and fixed the two places that were using it, as they both had errors in the way it was used. 2018-01-18 14:25:25 +01:00
vnau 2250f5fda1 Fix for AppVeyor. 2017-12-25 23:13:08 +07:00
vnau 62a7901aca Compression modules refactored to work with streams instead of filenames;
Added unit test to check compression reversibility
2017-12-25 04:12:19 +07: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 b42ab42e57 Fixed the updater to use the argument escaping code from utilities.
This fixes #2891
2017-11-22 10:39:02 +01:00
Kenneth Skovhede d97d1c3215 Re-enabled the options to disable the auto-updater 2017-10-30 16:11:17 +01:00
Kenneth Skovhede 8f9977889c Fixed a few string compares
Fixed excluding webroot folder from checks
2017-10-22 13:14:36 +02:00
Kenneth Skovhede 124a5c4cf5 Added temporary option to allow switching between the auto update invoke methods, in case we need to test something on installed machines 2017-10-12 11:17:45 +02:00
Kenneth Skovhede 6ad0fa649e Re-wrote the auto-updater to use process spawning instead of AppDomain loading to execute updates. 2017-10-11 12:49:14 +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 29f67674a5 Comment fix 2017-03-22 23:25:47 +01:00
frelis 397c769119 Update manager : Ignore webroot Folder
Added a property to ignore, if set, the webroot folder, when checking if
the update packages  are not tampered

fixes duplicati/duplicati#2266
2017-03-08 14:50:59 +01:00
Kenneth Skovhede 61e18f9b9d Added a check to see if the base version is more recent than the latest installed update.
This fixes #2061
2016-11-03 13:45:41 +01:00
Kenneth Skovhede 07345f6250 Implemented PO file parsing in Localizations 2016-09-27 20:44:19 +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 ce53e292ba Bugfix 2016-04-26 11:29:51 +02:00
Kenneth Skovhede 7486476881 Prettier display name 2016-04-26 11:17:35 +02:00
Kenneth Skovhede e10c94bc03 Fixed displayed version for builds that have no manifest, but a valid license version tag 2016-04-26 10:47:13 +02:00
Kenneth Skovhede c5be6a1652 Added release type to update manager to avoid relying on a valid manifest for the install 2016-04-26 10:32:21 +02:00
Kenneth Skovhede 7bbd9f3141 Changed the way the autoupdater probes for potential paths, such that it does not attempt to use ProgramFiles, even if it is write-able.
Added some better choices for storing update data on OSX.
2016-04-21 10:57:46 +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 045f4caacb Added detection of channel by parsing custom updater urls 2016-03-13 12:27:33 +01:00
Kenneth Skovhede e0237b5309 Implemented two new build channels: beta and canary.
Updated build system to allow building various types of releases.
2016-03-11 22:55:32 +01:00
Kenneth Skovhede 4010372545 Fixed the issue with a popup offering to "update" to an older version 2015-12-22 00:41:49 +01:00
Kenneth Skovhede 41dc78c5c4 Exposing the installid for the comming usage reporter module 2015-12-17 11:08:39 +01:00
Kenneth Skovhede 1a024d2df5 Fixed creating spurious folders on non-windows platforms.
This fixes #1508.
2015-12-06 22:02:48 +01:00