Commit Graph
160 Commits
Author SHA1 Message Date
Dean Ferreyra 5f94cc19a7 Fix restore GUI handling of folders with * or ?
Add new filter syntax, prefixing with an "at sign"; i.e., `@...`, that
disables glob expansion, treating `*` and `?` wildcard characters as
literal characters.

In the GUI, change the restore file picker to prefix paths with `@`
when expanding a node to avoid mistaking literal `*` or `?` characters
for wildcards characters and triggering the following error:
```
Filter for list-folder-contents must be a path prefix with no wildcards Parameter name: filter
```

This fixes #4300.
2020-08-30 17:07:04 -07:00
Kenneth Hsu 83ac03843d Fix spelling errors in comments.
In doing so, we also normalized some line endings.
2019-12-14 09:52:55 -08:00
Kenneth Hsu 6c36a4bc93 Avoid possible invalid DateTimeOffset values.
When creating a new backup, a value of DateTime.MinValue can be provided
to the NormalizeDateTimeToEpochSeconds method.  If DateTimeOffset is
used, it will convert the provided DateTime to the UTC equivalent, which
may result in a value outside of the allowable bounds.

This reverts the changes from pull request #3919.
This fixes issue #3955.
2019-10-23 19:49:36 -07:00
Kenneth Hsu afab61a05b Use pattern matching to simplify casts. 2019-10-19 10:15:38 -07:00
Kyle Stanfield 7dffbaf800 Changed NormalizeDateTimeToEpochSeconds to use ToUnixTimeSeconds 2019-09-20 19:08:26 -07:00
Kenneth SkovhedeandGitHub d5b77ebb61 Fixed incorrect escaping of pipe characters 2019-09-19 22:09:50 +02:00
Kenneth Hsu e64d6a6216 Remove unused output parameter.
This will avoid potential confusion as the provided byte[] array is
itself being modified.
2019-09-14 18:46:06 -07:00
Kenneth Hsu 53befa36fc Fix XML documentation. 2019-09-01 12:38:23 -07:00
Kenneth Hsu 0a390bd31a Move NormalizeDateTimeToEpochSeconds method to Utility class. 2019-09-01 12:38:23 -07:00
Kenneth Hsu 40cae529e6 Move NormalizeDateTime method to Utility class. 2019-09-01 12:38:23 -07:00
Sean Templeton b1c6e9798d Update Amazon Cloud Drive backend for async Put 2019-03-05 21:08:14 -06:00
Kenneth Hsu 9c7f71a63d Remove unnecessary newline. 2019-01-02 15:45:53 -08:00
Kenneth Hsu 16da136a6a Avoid redundant addition of trailing slashes to folder names.
The trailing slash is added when the folder name is pushed onto the
stack.
2019-01-02 15:45:53 -08:00
Kenneth Hsu 8dd3aeaf26 Use invariant culture in calls to ToLower and ToUpper. 2018-12-11 21:21:07 -08:00
Kenneth Hsu b363be1db9 Remove unnecessary newline. 2018-11-18 17:04:41 -08:00
Kenneth Hsu e88b83bf92 Remove unnecessary method overload. 2018-11-18 17:00:46 -08:00
Kenneth Hsu daa8ed7d0f Remove unnecessary lambda expression.
Since the filter is always empty, every folder should be inspected when
enumerating the filesystem entries.
2018-11-18 16:58:46 -08:00
Kenneth Hsu fb7ddf59f2 Remove unnecessary method overload. 2018-11-18 16:54:30 -08:00
Kenneth Hsu 94202ba038 Remove unnecessary method overload. 2018-11-18 16:53:07 -08:00
Kenneth Hsu e03ba7c5d8 Remove unnecessary method overload. 2018-11-18 16:49:38 -08:00
Kenneth Hsu d4584b8443 Remove unnecessary method overload. 2018-11-18 16:48:53 -08:00
Kenneth Hsu 722ff0cca5 Remove unused method parameter. 2018-11-18 16:47:59 -08: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 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 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 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 b45c41026e Use ordinal file path comparisons.
This addresses issue #3342.
2018-08-30 21:52:02 -07:00
Kenneth SkovhedeandGitHub 05059e3859 Merge pull request #3329 from warwickmm/refactor/remove_unused_utilities
Remove unused members from Utility class
2018-08-29 11:27:33 +02:00
Kenneth Skovhede 2ec203cabe Removed Task types and the TaskReader property from serialized results, as they have no usable serialized format 2018-08-08 11:59:20 +02:00
Kenneth Hsu 6b521691ce Remove unused ENVIRONMENT_VARIABLE_MATCHER_LINUX property.
This was added in revision 0b442ecdc6, but no usages could be found.  A
potential use-case is mentioned in a comment, so the implementation was
moved to the comment.
2018-08-02 21:40:51 -07:00
Kenneth Hsu 79f143e84a Remove unused ToUnixTimestamp utility method.
This was added in revision 6255572c25 ("Added a timestamp value to the
end of dates in the report output for easier parsing"), but no usages
could be found.
2018-08-02 21:36:32 -07:00
Kenneth Hsu f2b682e94f Remove unused Base64UrlDecode utility method.
This was added in revision aca4ed95cc ("More work on the block hash"),
but no usages could be found.
2018-08-02 21:36:32 -07:00
Kenneth Hsu a1a4bd8b90 Remove unused ReplaceFile utility method.
This was added in revision a0521da54d ("Initial version of the new
block-based storage format"), but no usages could be found.
2018-08-02 21:36:29 -07:00
Kenneth Hsu da3cf6d2b3 Remove unused DefaultCulture utility property.
Usages were removed in revision 2264c07f3b ("Removed unused files").
2018-08-02 21:36:25 -07:00
Kenneth Hsu 70b0d093fe Remove unused CalculateHash utility method.
Usages were removed in revision 3ff2f1eb98.
2018-08-02 21:36:20 -07:00
Kenneth Hsu c3cda5dc58 Remove unused IsValidHostname utility method.
Usages were removed in revision 62c75d9af9 ("Removed all informs code
(no more 1.3.x UI)").
2018-08-02 21:29:09 -07:00
Kenneth Hsu c7f4bcd0d3 Remove unused LocateFileInSystemPath utility method.
Usages were removed in revision 62c75d9af9 ("Removed all informs code
(no more 1.3.x UI)").
2018-08-02 21:27:25 -07:00
Kenneth Hsu 54c4f9224d 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-06-21 19:28:27 -07:00
Kenneth SkovhedeandGitHub db1bf986be Merge pull request #3267 from verhoek/fix/subprocess_readkey
Fix - Console.ReadKey for encryption passphrase
2018-06-15 09:10:54 +02:00
verhoek 07ae90f325 Simplified plus made defaults explicit. 2018-06-12 09:41:40 +02:00
Kenneth Skovhede d01e8f19c4 Fixed an issue after the merge conflict ... 2018-06-08 11:21:43 +02:00
Kenneth Skovhede 9485339659 Fixed an issue after the merge conflict 2018-06-08 11:20:03 +02:00
Kenneth Skovhede bce1db123a Merge branch 'master' into feature/speedup_backup_index_files
# Conflicts:
#	Duplicati/Library/Utility/Utility.cs
2018-06-08 10:31:27 +02:00
Kenneth Hsu 1605dc8ede Use utility method to read from stream. 2018-06-06 19:54:45 -07:00
verhoek 2f41e02ca9 Merge branch 'master' into refactored 2018-05-18 08:05:19 +02:00