This is a defensive measure in case legacy path handling has been
enabled at the system level. Duplicati requires that legacy path
handling be _disabled_ to function properly.
Issue #4295 appears to be a result of legacy path handling being
enabled globally.
Replace `VerifyDir` and `CompareFiles` with
`AssertDirectoryTreesAreEquivalent` and `AssertFilesAreEqual`.
Move `WriteFile` to `TestUtils`.
Add "Symlink" category to start.sh.
This adds a basic symlink policy test that performs backups using each
symlink policy.
If you don't have the required privilege in Windows, you can get an
exception trying to create a symbolic link. If an exception is thrown
trying to create a symbolic link, the exception is trapped and the
test is marked as "Ignored"; e.g.,
```
1) Ignored : Duplicati.UnitTest.SymLinkTests.SymLinkPolicy
Client could not create a symbolic link. Error reported: (1314) A required privilege is not held by the client. | Read: [C:\td\backup-data\target] | Write: [C:\td\backup-data\symlink]
```
Fix restore GUI handling of folders with wildcard characters.
This does so by introducing a new syntax for verbatim path specifications.
Similar to C#, expressions that are prefixed by '@' are treated as verbatim
string literals.
Change RestoreController.js to handle the case where the selected
restore paths contain literal wildcard characters. For files, prefix
with `@`. For directories, convert to regular expression filters so
that we can preserve the literal wildcard characters and also support
the equivalent of a globbing `*` suffix.
Change "find" and "restore" commands to not prefix `@` file filters
with `*` and to not suffix `@` folder filters with `*` since wildcards
cannot be used with `@` filters.
Switch back to using `FilterType.Simple` for `@` filters to fix the
restore picker again.
In LocalDatabase.cs, replace code that was explicitly looking for the
presence of wildcard characters to instead trigger off of
`FilterType.Wildcard`. This fixes the "find" command.
Change FilterEntry.ToString() to prefix Simple filters with `@` so
that if simple filters with wildcard characters make the round-trip
through a string, their `FilterType.Simple` type is preserved.
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.
Tree changes in query
* Move inner selection S to a temporary table
* Reorder join field in outer query
* Remove intersection with File view in outer selection
File view is already intersected with in selection S
With the above-mentioned changes, on a specific testset, query took 9s instead of 6min.