Commit Graph
5815 Commits
Author SHA1 Message Date
Rune HenriksenandGitHub fbab37d138 Merge pull request #3413 from warwickmm/avoid_null_reference
Avoid potential null reference exception
2018-10-07 19:14:34 +02:00
Rune HenriksenandGitHub 6b6faebea3 Merge pull request #3404 from lucascosti/server_stat_string_cleanup
Fix server status strings grammar and consistency
2018-10-07 19:13:22 +02:00
Rune HenriksenandGitHub 6c662a0d8b Merge pull request #3412 from mnaiman/normalize_path
all drives letter uppercase
2018-10-07 19:07:52 +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
Rune HenriksenandGitHub dc5a0dbc94 Merge pull request #3409 from warwickmm/remove_unused_parameters
Remove unused method parameters
2018-10-07 18:56:43 +02:00
Rune HenriksenandGitHub 9dac0c3b7b Merge pull request #3406 from Pectojin/upgrade_mega_api_client
updated MegaApiClient from 1.6.0 to 1.6.3
2018-10-07 18:56:15 +02:00
Max123456 73d7aaffdc Invariant Upper 2018-10-07 11:47:48 +02:00
Max123456 0c71f0af2c all drives letter uppercase 2018-10-07 11:32:25 +02:00
Kenneth Hsu b6e1e3e3f4 Avoid potential null reference exception. 2018-10-06 20:42:25 -07: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 0c1ac9c489 Replace chained LINQ calls with call to overload with predicate.
This simplifies the code by reducing the number of enumerators created
while also making the code slightly more readable.
2018-10-06 16:20:18 -07:00
Kenneth Hsu d72128ec83 Remove unused method parameters. 2018-10-06 15:09:43 -07:00
Rune Henriksen 306ccabfef updated MegaApiClient from 1.6.0 to 1.6.3 2018-10-04 00:34:49 +02:00
Rune HenriksenandGitHub 439e319061 Merge pull request #3391 from sffetlio/description_field
Add Description field to backups
2018-10-04 00:13:05 +02:00
Rune HenriksenandGitHub 242a1bd227 Merge pull request #3402 from warwickmm/constructor_virtual_members
Avoid referencing virtual members in MicrosoftGraphBackend constructor
2018-10-04 00:08:51 +02:00
Lucas Costi 1be80fde3e Fix server status strings grammar and consistency 2018-10-02 17:37:17 +10:00
Kenneth Hsu e2bc85c7e4 Merge remote-tracking branch 'upstream/master' into constructor_virtual_members
Resolved Conflicts:
	Duplicati/Library/Backend/OneDrive/MicrosoftGraphBackend.cs
2018-10-01 17:15:58 -07:00
Rune HenriksenandGitHub b9efd3a3a7 Merge pull request #3400 from warwickmm/fix_potential_null_reference
Check for null reference before accessing property
2018-10-01 23:20:24 +02:00
Rune HenriksenandGitHub 5f4236cbc2 Merge pull request #3399 from duplicati/remove_unused_variables_assignments
Remove unused variables, fields, and unnecessary assignments
2018-10-01 23:19:37 +02:00
Rune HenriksenandGitHub 38fe97b7f4 Merge pull request #3398 from duplicati/avoid_hiding_property
Rename local variable to avoid hiding class field
2018-10-01 23:16:31 +02:00
sffetlio e933d806b4 Fix schema version 2018-10-01 11:52:16 +03:00
Kenneth Hsu 024bc5bea2 Mark immutable field as readonly. 2018-09-30 15:45:42 -07:00
Kenneth Hsu ee14862db5 Add comment to clarify use of Lazy. 2018-09-30 15:06:55 -07:00
Kenneth Hsu f59607d94d Rename property. 2018-09-30 15:06:55 -07:00
Kenneth Hsu f9022fec66 Avoid referencing virtual members in constructor.
Since the call to GetRootPathFromUrl may be expensive, we cache the
value using a lazy initializer.
2018-09-30 15:06:49 -07:00
Kenneth Hsu 7cf830cad7 Provide protocol key to MicrosoftGraphBackend constructor.
This will help us avoid referencing virtual members in the constructor.
2018-09-30 10:59:26 -07:00
Kenneth Hsu 6215fe1ac5 Extract string to private constant.
This will allow us to provide the string as a parameter to the parent
class constructor to avoid referencing virtual members in the
constructor.
2018-09-30 10:56:59 -07:00
Kenneth Hsu cd538de4b9 Check for null reference before accessing property. 2018-09-29 16:49:05 -07:00
Kenneth Hsu 11689159eb Disable warning about unreferenced field.
This field is unreferenced, but we might now want the object to be
disposed of by the garbage collector.
2018-09-29 13:38:11 -07:00
Kenneth Hsu 81875adcfb Restore removed reference to system settings context.
This initializes some state and is IDisposable, so it is not so trivial
to remove.
2018-09-29 13:20:16 -07:00
Kenneth Hsu 183ae4ede2 Remove additional unused variables. 2018-09-29 12:49:22 -07:00
Kenneth Hsu 8902da39f2 Undo removal of method parameters.
This should be done on a separate branch for a different pull request.
2018-09-29 10:44:05 -07:00
Kenneth Hsu 40f3e33835 Suppress warning about non-awaited task. 2018-09-29 10:44:05 -07:00
Kenneth Hsu 93304f0506 Add comment regarding removed code. 2018-09-29 10:44:05 -07:00
Kenneth Hsu 9ce1e807c7 Remove unused variables and fields. 2018-09-29 10:41:27 -07:00
Kenneth Hsu 44b7c29489 Rename local variable to avoid hiding class field. 2018-09-28 20:57:44 -07:00
Kenneth Hsu f4f676a1de Remove unnecessary variable assignment.
These variables are assigned values that are never read by any
subsequent instruction.
2018-09-28 20:13:45 -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 SkovhedeandGitHub 0ec49d3a87 Merge pull request #3393 from warwickmm/fix_append_dir_separator
Fix behavior of AppendDirSeparator utility method
2018-09-28 22:24:11 +02:00
Kenneth SkovhedeandGitHub f24bce8e14 Merge pull request #3392 from warwickmm/simplify_method_resolution
Simplify method resolution by removing default parameters
2018-09-28 22:21:29 +02:00
Kenneth SkovhedeandGitHub 772d15bfd7 Merge pull request #3390 from warwickmm/configure_await_false
Allow tasks to complete on any thread when context is irrelevant
2018-09-28 22:15:51 +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 d4d1945faf Use utility method to append trailing slash.
This removes some duplicated code.
2018-09-22 10:19:45 -07:00
Kenneth Hsu 2d397745d0 Add unit test for utility that appends path separator. 2018-09-22 10:19:45 -07:00
Kenneth Hsu a325a8e0e7 Fix XML documentation to more accurately reflect behavior. 2018-09-22 10:19:45 -07:00
Kenneth Hsu 67871a76ed Fix bug. Append separator when string ends with same separator.
Previously, the replacement would occur if the provided string did not
end with the platform-dependent directory separator.  However, this
utility method is often used to append a trailing slash to URL
specifiers.
2018-09-22 10:19:45 -07:00
Kenneth Hsu 18aae7a5c4 Simplify method resolution by removing default parameters.
The previous implementations resulted in an overload being hidden by one
without a default parameter, making it unclear which method was being
called.  For example, consider the following signatures:

public MultipartItem(string content, string contenttype = null, string name = null, string filename = null)
public MultipartItem(string contenttype, string name = null, string filename = null)

From https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/classes-and-structs/named-and-optional-arguments,

> If two candidates are judged to be equally good, preference goes to a
> candidate that does not have optional parameters for which arguments
> were omitted in the call. This is a consequence of a general preference
> in overload resolution for candidates that have fewer parameters.
2018-09-20 19:30:49 -07:00
Rune HenriksenandGitHub 0901d3f62f Merge pull request #3387 from warwickmm/ordinal_case_insensitive_comparison
Use ordinal case-insensitive comparison instead of ToLower and ToUpper
2018-09-20 23:33:21 +02:00
Rune HenriksenandGitHub bb60050639 Merge pull request #3388 from warwickmm/remove_string_formatting
Remove unnecessary call to String.Format
2018-09-20 23:30:22 +02:00
Rune HenriksenandGitHub 840031b358 Merge pull request #3389 from warwickmm/use_local_variable
Use existing local variable to improve readability
2018-09-20 23:29:45 +02:00