Kenneth Hsu
6c08f44394
Revert "Avoid potential comparison of value type with null."
...
This reverts commit ecb670a2d9 .
While there aren't any cases where the generic type is a struct, the
comparison with default(T) is incorrect. If T is int, we wouldn't want
the behavior to differ based on whether the value was zero or nonzero.
2018-10-08 18:54:36 -07:00
Rune Henriksen and GitHub
aa1f99628c
Merge pull request #3414 from warwickmm/avoid_value_null_comparison
...
Avoid potential comparison of value type with null
2018-10-07 22:35:25 +02:00
Rune Henriksen and GitHub
6c662a0d8b
Merge pull request #3412 from mnaiman/normalize_path
...
all drives letter uppercase
2018-10-07 19:07:52 +02:00
Rune Henriksen and GitHub
be7edb580d
Merge pull request #3410 from warwickmm/simplify_enumerating_collections
...
Simplify enumeration of collections
2018-10-07 19:06:28 +02:00
Kenneth Hsu
ecb670a2d9
Avoid potential comparison of value type with null.
...
While there aren't currently any cases where the generic type is a value
type, this will make the code slightly more robust to future
implementations.
2018-10-07 09:59:13 -07:00
Rune Henriksen and GitHub
dc5a0dbc94
Merge pull request #3409 from warwickmm/remove_unused_parameters
...
Remove unused method parameters
2018-10-07 18:56:43 +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
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
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 Henriksen and GitHub
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
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
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
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 Skovhede and GitHub
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 Skovhede and GitHub
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 Skovhede and GitHub
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 Skovhede and GitHub
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
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
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 Hsu
0d23302220
Use ordinal case-insensitive comparison instead of ToLower.
2018-09-19 15:21:59 -07:00
Kenneth Skovhede and GitHub
5b98c4c8aa
Merge pull request #3377 from dgehri/master
...
refs #3372 : tentative fix for FailedToUseChangeJournal
2018-09-15 00:29:05 +02:00
Kenneth Skovhede and GitHub
b27e18cca1
Merge pull request #3380 from jkellerer/fix-linux-snapshot-is-block-device
...
Fixed #3373 - LVM: Backup failure on removed files
2018-09-15 00:27:59 +02:00
Kenneth Skovhede and GitHub
01c3e52f68
Merge pull request #3368 from LacunaSoftware/progressBar
...
Fix progress bar not updating size and number of files processed
2018-09-15 00:27:05 +02:00
jkellerer and juergen kellerer
fde179c2a2
Fixed #3373 - LVM: Backup failure on removed files
...
Fixes a problem in IsBlockDevice(localPath) which throws an exception when a path that exists in the snapshot is removed from the disk during the backup.
2018-09-14 12:00:20 +02:00
Daniel Gehriger
8ae700c05e
refs ##3311 : fix for PathTooLongException
2018-09-12 21:59:54 +02:00
Daniel Gehriger
a160ef305d
refs #3372 : tentative fix for FailedToUseChangeJournal: Failed to compare two elements in the array
2018-09-12 21:51:54 +02:00
Max
881087f968
allow projects to execute
2018-09-10 14:44:44 +02:00
Max
86d015997b
Dependency info suppress
2018-09-10 14:34:20 +02:00
Max
2cac7cecd2
AlphaFS, AlphaVSS fully functional
2018-09-10 13:31:26 +02:00
Max
ed9af377d2
Utility buildable
2018-09-09 21:33:32 +02:00
Max
513a4c71cf
Snapshots convert
2018-09-09 21:19:41 +02:00
Max
00887055cc
Utility convert
...
Battery status without Forms dependance
2018-09-09 20:56:07 +02:00
Max
be503ea028
utility cleanup
...
zipfiledebugger converted
2018-09-09 15:54:14 +02:00