Commit Graph
112 Commits
Author SHA1 Message Date
Kenneth SkovhedeandGitHub 99d0cb3c57 Merge pull request #3953 from warwickmm/make_fields_readonly
Mark fields that don't need to be reassigned as readonly
2019-10-21 08:36:17 +02:00
Kenneth Hsu 2aa76881a5 Mark fields that don't need to be reassigned as readonly.
This makes it explicit at compile-time that these fields should not be
reassigned outside the constructor.
2019-10-19 13:59:22 -07:00
Kenneth Hsu afab61a05b Use pattern matching to simplify casts. 2019-10-19 10:15:38 -07:00
BlueBlock d281f67570 change exe projects to true for AutoGenerateBindingRedirects
resolves build warning for mismatching assemblies
2019-08-03 20:44:22 -04:00
BlueBlock 815e30b63b update csproj toolverion and nuget packages 2019-07-31 13:20:03 -04:00
BlueBlock 08a1e9998a initial upgrade to framework 4.6.2
- no code changes except those noted below
- projects upgrade to 4.6.2
- wixinstaller project upgraded automatically by VisualStudio
- wixinstaller updated to require 4.6.2
- Library.Encryption changed to Standard2.0 so accommodate update to SharpAesCrypt
2019-07-26 09:18:16 -04: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 ae5d6ffcc7 Added option to generate new priv/pub key pair without verifying the manifest. 2018-12-23 20:32:21 +01:00
verhoek ab12be6bbd Renamed IsClientLinux to IsClientPosix . 2018-11-03 09:26:04 +01:00
verhoek 72b1f6b6f8 Updated project files. 2018-11-02 22:45:07 +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
Kenneth Hsu 18cb3ade80 Seal method to avoid potential reference to uninitialized members.
The constructor calls the Position property's setter.  To avoid
potential references to uninitialized members, we disallow a subclass
from overriding the implementation.
2018-10-18 21:11:50 -07:00
Kenneth Hsu 07c1d85b4a Remove empty statements. 2018-10-10 21:22:31 -07: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 3fb7175931 Merge remote-tracking branch 'origin/master' into feature/tempdir
# Conflicts:
#	Duplicati/Server/Runner.cs (copied readonly prop)
2018-06-07 16:37:40 +02:00
Kenneth Hsu 1605dc8ede Use utility method to read from stream. 2018-06-06 19:54: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
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 027475f494 Enabling webroot checking for the autoupdater library 2017-10-22 13:15:11 +02: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 7537bb72fc Added options to run the update manager in a "check" mode that shows if it thinks the updated versions are modified or not 2017-10-12 11:40:40 +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
Kenneth Skovhede a06f38442a Updated all Newtonsoft.Json packages 2017-09-23 00:25:50 +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 2b2e495e15 Added the <Prefer32Bit>False</Prefer32Bit> option to all executables.
This fixes #2519
2017-06-02 09:42:29 +02:00