Commit Graph
10149 Commits
Author SHA1 Message Date
Dean Ferreyra aa50b1dfbf Fix typo in comment 2020-08-30 20:04:07 -07:00
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 aa2e92ea3a Fix appearance of loading icon in file restore tree.
This fixes #4294.
2020-08-29 10:07:59 -07:00
warwickmmandGitHub 40597aaec2 Merge pull request #4297 from pcmind/fixGetFilesAndSourceBlocksFast
Improve query performance used in GetFilesAndSourceBlocksFast
2020-08-27 09:17:26 -07:00
Honoré Vasconcelos 71494826f9 Improve query performence used in GetFilesAndSourceBlocksFast
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.
2020-08-26 10:10:54 +01:00
Kenneth Hsu f28550f4b5 Use overload instead of optional parameters.
From Codacy:

The overloading mechanism should be used in place of optional parameters for several reasons:

* Optional parameter values are baked into the method call site code,
  thus, if a default value has been changed, all referencing assemblies
  need to be rebuilt, otherwise the original values will be used.
* The Common Language Specification (CLS) allows compilers to ignore
  default parameter values, and thus require the caller to explicitly
  specify the values. For example, if you want to consume a method with
  default argument from another .NET compatible language (for instance
  C++/CLI), you will have to provide all arguments. When using method
  overloads, you could achieve similar behavior as default arguments.
* Optional parameters prevent muddying the definition of the function
  contract. Here is a simple example: if there are two optional
  parameters, when one is defined, is the second one still optional or
  mandatory?
2020-08-24 07:51:57 -07:00
Kenneth Hsu c15cdcf26a Remove unused local variable. 2020-08-24 07:49:14 -07:00
Kenneth Hsu 5915fdfba9 Add test for exporting backup configuration to JSON.
This tests that we escape '@' with '%40', as the import code in
escape_uri in AppUtils.js cannot handle '@'.

This concerns issue #3619.
2020-08-24 07:41:00 -07:00
Kenneth Hsu e59e9a42b8 Extract removal of passwords to method.
This makes it easier to create a simple test for the behavior.
2020-08-24 07:41:00 -07:00
Kenneth Hsu 9dd98457f1 Clean up code. 2020-08-24 07:41:00 -07:00
Kenneth Hsu acba6351dc Extract local function to method. 2020-08-24 07:41:00 -07:00
Kenneth Hsu d4d7874aaf Avoid decoding URL parameters when removing passwords.
In revision c41f2c6a60 ("moved all sanitization logic into backup class
and moved from regex to using internal Uri library"), we cleaned up the
removal of passwords from an exported backup configuration.  However,
the use of Uri.QueryParameters resulted in exporting decoded parameter
values, which violated some assumptions made by the decode_uri function
in AppUtils.js.  This caused usernames in the JSON to contain '@'
instead of '%40', which led to incorrect decomposition of the target URL
into its components in the UI.

This concerns issue #3619.
2020-08-24 07:41:00 -07:00
Kenneth Hsu 8ae5b81e16 Remove script used for previous Travis configuration.
As of pull request #4005, our Travis builds no longer use this script.
2020-08-22 16:33:35 -07:00
Kenneth Hsu 201bb53b29 Add mono-complete to Docker image.
After targeting .NET 4.7.1, some users started encountering errors like:

Could not find method '.ctor' due to a type load error: Could not load
file or assembly 'netstandard, Version=2.0.0.0, Culture=neutral,
PublicKeyToken=cc7b13ffcd2ddd51' or one of its dependencies.
assembly:/opt/duplicati/SharpAESCrypt.exe type:SharpAESCrypt
member:(null)

The TencentCOS and Tardigrade backends are built on .NET Standard 2.0,
and it appears that the dependencies can be awoken even if these
backends are not used.

This fixes #4289.
2020-08-22 15:24:25 -07:00
warwickmmandGitHub bcaedebecd Merge pull request #4287 from dgehri/feature/improve_usn_2
Improve USN performance.
2020-08-22 09:28:05 -07:00
warwickmmandGitHub 83318877a1 Merge pull request #4285 from dferreyra/source_path_with_unc_prefix_3
Handle Windows source paths starting with "\\?\"
2020-08-21 07:38:12 -07:00
Daniel Gehriger 31bb24d605 USN: moving exclusion filter earlier in the enumeration process to improve performance 2020-08-18 16:07:01 +02:00
Daniel Gehriger bb1853085d USN: only considering events relevant to backup 2020-08-18 12:21:59 +02:00
Daniel Gehriger 0b3b61c2a1 Merge branch 'feature/speed-up-AppendFilesFromPreviousSetWithPredicate' into feature/improve_usn_2 2020-08-18 11:45:15 +02:00
Daniel Gehriger b6752bead3 USN: excluding non-relevant events 2020-08-18 11:43:52 +02:00
Daniel Gehriger d143f8b3f9 Improved speed of AppendFilesFromPreviousSetWithPredicate, making USN backups usable when there are large file sets 2020-08-18 11:43:23 +02:00
Daniel Gehriger 494701cc94 USN: corrected exclusion criteria
(cherry picked from commit 420c23cf05)
2020-08-17 23:04:07 +02:00
Daniel Gehriger 420c23cf05 USN: corrected exclusion criteria 2020-08-17 23:03:51 +02:00
Daniel Gehriger 82c54dde31 Fixing AppendFilesFromPreviousSetWithPredicate 2020-08-17 23:01:20 +02:00
Daniel Gehriger c5bef5c2e0 Improved Improved speed of AppendFilesFromPreviousSetWithPredicate, making USN backups usable when there are large file sets 2020-08-17 18:06:38 +02:00
Daniel Gehriger 8e8c758c65 Improved speed of AppendFilesFromPreviousSetWithPredicate, making USN backups usable when there are large file sets 2020-08-17 17:27:45 +02:00
Daniel Gehriger 7d2c6befb0 Using USN journal in CountFilesHandler 2020-08-17 15:08:15 +02:00
Daniel Gehriger 245046e8e5 USN: adding verbose message 2020-08-17 14:41:41 +02:00
Daniel Gehriger 0caf724982 USN journal: removing create & delete sequences between two backups from list of files 2020-08-17 14:41:23 +02:00
Dean Ferreyra b8eecba62c Handle Windows source paths starting with "\\?\"
Under Windows, strip paths of any `\\?\` prefix to prevent Duplicati
from storing paths prefixed with `\\?\`.

This fixes an inconsistency in the stored data where, if the user
provided a prefixed path to back up (e.g., `\\?\C:\Temp`), Duplicati
would store an entry with the prefixed path (e.g., `\\?\C:\Temp`)
along with entries with paths stripped of their prefix (e.g.,
`C:\Temp\file.txt`).  By only storing non-prefixed paths, this also
avoids an error reported by the GUI when it would encounter a prefixed
path:
```
Filter for list-folder-contents must be a path prefix with no wildcards Parameter name: filter
```
2020-08-15 20:09:54 -07:00
Kenneth Skovhede 145ef49b91 Version bump to v2.0.5.110-2.0.5.110_canary_2020-08-10
You can download this build from:

Binaries: https://updates.duplicati.com/canary/duplicati-2.0.5.110_canary_2020-08-10.zip

Signature file: https://updates.duplicati.com/canary/duplicati-2.0.5.110_canary_2020-08-10.zip.sig

ASCII signature file: https://updates.duplicati.com/canary/duplicati-2.0.5.110_canary_2020-08-10.zip.sig.asc

MD5: 583e6cf913be6edc3966b862dff024c7

SHA1: c5a9e9dab0085667051b94a507f47f9217401567

SHA256: 69720d935b4d9ca1383d53cfc9308727fac8ac48683d2ac9f7d1487849c4a7c8
v2.0.5.110-2.0.5.110_canary_2020-08-10
2020-08-10 16:35:43 +02:00
warwickmmandGitHub b68d9fe157 Merge pull request #4278 from dferreyra/fix_4256_snapshot_backups
Fix issue with root volumes and snapshots broken by #4256
2020-08-08 17:14:00 -07:00
Dean Ferreyra ecd62e8cea Fix snapshots broken by #4256
Add comment in `WindowsSnapshot.ConvertToSnapshotPath()` warning how
replacing some manual path construction code with Path.Combine() alone
can lead to invalid snapshot paths.
2020-08-08 15:32:54 -07:00
Kenneth Hsu 9392e90b5b Remove redundant build in Travis build script. 2020-08-08 12:43:30 -07:00
Kenneth Hsu 26482a426b Fix indentation in Travis build script. 2020-08-08 12:43:07 -07:00
Kenneth Hsu 6b7987fdd6 Remove __MonoCS__ constant from travis build.
This is no longer needed (see pull request #4213).
2020-08-08 12:41:23 -07:00
Kenneth Hsu 62814c1c6e Add new test categories to local test runner script.
We forgot to add these when introducing the new test categories.
2020-08-08 12:35:51 -07:00
Dean Ferreyra 1198c10d43 Fix snapshots broken by #4256
Revert the change made to `WindowsSnapshot.ConvertToSnapshotPath()`
by pull request #4256.

The change in #4256 replaced some existing manual path construction
code with a call to `SystemIO.IO_WIN.PathCombine()`, but calling
`SystemIO.IO_WIN.PathCombine()` this way did not always result in
valid VSS paths.  For example, trying to back up a root volume like
"C:\" would result in the following error:
```
The filename, directory name, or volume label syntax is incorrect.
```
2020-08-07 21:51:11 -07:00
Kenneth Skovhede 9380bbba60 Updated discourse automatic post creation to use the new API format 2020-08-07 13:41:32 +02:00
Kenneth Skovhede 25c1a5b657 Fixed breaking RPM builds due to bundled binaries 2020-08-07 13:15:38 +02:00
Kenneth Skovhede 160bd8b8cd Version bump to v2.0.5.109-2.0.5.109_canary_2020-08-07
You can download this build from:

Binaries: https://updates.duplicati.com/canary/duplicati-2.0.5.109_canary_2020-08-07.zip

Signature file: https://updates.duplicati.com/canary/duplicati-2.0.5.109_canary_2020-08-07.zip.sig

ASCII signature file: https://updates.duplicati.com/canary/duplicati-2.0.5.109_canary_2020-08-07.zip.sig.asc

MD5: aff69e0334f6154ae82e88cb119f8444

SHA1: ef260022aa5d4cea8adaabf52e59317b9057968c

SHA256: ea647d637b71cfd80ff228c3a0016aa9977892b40a5ea1fc6caa0959d9480f3e
v2.0.5.109-2.0.5.109_canary_2020-08-07
2020-08-07 13:00:15 +02:00
Kenneth SkovhedeandGitHub 648d199427 Merge pull request #4277 from dgehri/feature/USN-deleted-files-fix
Enabled support for \$Extend\$Deleted special MTF folder when using USN
2020-08-07 12:07:44 +02:00
Kenneth SkovhedeandGitHub ec1975b5a7 Merge pull request #4269 from warwickmm/target_net_471
Target .NET Framework 4.7.1
2020-08-07 10:50:35 +02:00
Kenneth SkovhedeandGitHub 04dd510be0 Merge pull request #4261 from warwickmm/avoid_deleting_unrelated_files
Avoid deleting unrelated files when removing backup configuration
2020-08-07 10:33:31 +02:00
Kenneth SkovhedeandGitHub e5b0ac2749 Merge pull request #4260 from warwickmm/remove_unnecessary_path_combine
Remove unnecessary call to Path.Combine
2020-08-07 10:31:47 +02:00
Kenneth SkovhedeandGitHub 2d628053fa Merge pull request #4259 from warwickmm/test_check_warnings_and_errors
Check for errors and warnings in unit tests
2020-08-07 10:30:21 +02:00
Kenneth SkovhedeandGitHub ac5dda8be7 Merge pull request #4257 from warwickmm/test_invalid_windows_paths
Add tests for invalid Windows paths
2020-08-07 10:29:54 +02:00
Daniel Gehriger fcf44d595d Restoring original scheduling of CountFilesHandler 2020-08-06 18:14:07 +02:00
Daniel Gehriger 279d8d2d2c Fixed usn reason comparison (was too severe) 2020-08-06 17:58:19 +02:00
Daniel Gehriger 51ce673831 Removed debug assert 2020-08-06 16:56:52 +02:00