Commit Graph
181 Commits
Author SHA1 Message Date
Kenneth Skovhede 94058f8ac0 Handle nulls in file paths
This PR updates the File backend to sanitize filenames returned when listing the directory. For now, the sanitization only removes trailing/leading null characters.

This fixes #6449
2025-08-12 08:36:10 +02:00
Kenneth Skovhede 6031b4de8b Update Test method to check for write permissions
This PR moves the check from the FTP backend into shared code, so all backends will now check for read/write permissions when using the "Test" button.

For situations where write permissions are not required (like restore or verify) there is a flag on the v2 API that indicates if the connection was established, so the UI can show a message suggesting that it is possible to proceed, if the current UI operation does not require write permissions.

This fixes #2473
2025-05-21 17:19:27 +02:00
Carl Johnsen 58db4c9753 Restructured ItemGroups 2025-05-16 10:15:31 +02:00
Carl Johnsen 04153d2c12 Removed Microsoft.DotNet.Analyzers.Compatibility from csproj's as it's deprecated. 2025-05-16 09:53:26 +02:00
Kenneth Skovhede ca5159adf7 Make file backend error compliant
This PR makes the file backend throw the correct exception types for missing files and folders, so it works with the backend tester without errors.
2025-04-22 22:56:47 +02:00
Kenneth Skovhede 53ee9526ca Fixed some nullability warnings 2025-03-24 17:10:15 +01:00
Kenneth Skovhede dbe3a4eeac Updated file backend 2025-03-21 11:09:23 +01:00
Kenneth Skovhede 11a27042bc Merge remote-tracking branch 'origin/master' into feature/alternate-source-provider 2025-02-26 19:25:46 +01:00
Kenneth Skovhede 0f9669b273 Final conversion to async backends
This PR is the final change, where all backends are now purely implemented with async interfaces.

The code changes here replace the LIST call with an async version. This affect all backends (and then some) but the changes are mostly mechanical rewrites of the code.

In many places, the backeds were already prepared for async output, in other some glue was needed.

To reduce the scope of this change, some backends simply report a synchronous result as an async list.
2025-02-17 16:45:51 +01:00
Kenneth Skovhede 0e8df7ccd8 Removed unsupported code 2025-02-17 14:05:21 +01:00
Kenneth Skovhede bb5fd80a29 Implemented support for some backends as sources: SSH, CIFS, and S3 2025-02-17 14:01:08 +01:00
Kenneth Skovhede 8c935a7344 This creates a new ISourceProvider interface for describing a data source.
With this interface it is possible to wrap the current support for snapshots and USN and simplify the enumeration.

This makes a number of assumptions into fields such as `IsMetaEntry` and `IsRootEntry` that removes code that was checking for various properties.

This first commit has support for VSS and USN as well as "naked" files, keeping feature parity.

There is also an experimental support for loading a backend-as-a-source. The support for this is currently limited as the backends need to be extended to support a folder concept.
2025-02-09 16:14:22 +01:00
Kenneth SkovhedeandGitHub 997891525a Updated license-updater to update csproj files (#5898)
* Updated license-updater to update csproj files

* License updates
2025-01-22 21:04:19 +01:00
Kenneth SkovhedeandGitHub 9464caf622 Feature/update license 2025 (#5851)
* Fixed some minor whitespace issues

* Updated all copyright to 2025
2025-01-07 09:40:39 +01:00
Kenneth SkovhedeandGitHub ba645ddb5f Clean up options for file backend (#5820)
This removes unsupported arguments from non-windows clients, so the reported options fit what is supported.
2024-12-31 16:37:07 +01:00
Kenneth Skovhede 356498414c Fixed issue with quota info.
This fixes #5733
2024-12-03 22:12:38 +01:00
Kenneth Skovhede 61ea36091a Added DNSNames as async 2024-10-02 09:37:52 +02:00
Kenneth Skovhede 586c08522e Implemented async method for Test, CreateFolder and Quota in all backends.
Still missing the List and DNSHostnames.
The AsyncRequest class is also preventing many backends from fully upgrading.
2024-10-01 09:30:02 +02:00
Kenneth Skovhede 8bdb85e261 Implemented RenameAsync on all backends supporting rename 2024-09-29 23:21:50 +02:00
Kenneth Skovhede ecf2e8b551 Implemented DeleteAsync on all backends 2024-09-29 23:04:54 +02:00
Kenneth Skovhede e3e3d1305f Implemented async version of Get for all backends. 2024-09-29 22:00:57 +02:00
Suguru Hirahara 6f1a913eef Remove conjugation - supply 2024-08-13 08:07:28 -04:00
Suguru Hirahara d4057e57c5 Make backend descriptions consistent 2024-08-02 12:05:49 -04:00
Suguru Hirahara 49f5b486d8 Add a period to a string whose suffix is 'Long' on File/Strings.cs 2024-07-29 23:06:26 -04:00
Suguru Hirahara 1a3c0ef495 Set strings for options in a consistent way 2024-07-29 11:31:31 -04:00
Suguru Hirahara 8e85c10754 Set arguments for strings 2024-07-29 11:30:43 -04:00
Suguru Hirahara 43337dca90 Move strings 'Description' and 'DisplayName' up to the top inside the block 2024-07-29 02:23:07 -04:00
Kenneth SkovhedeandGitHub ffc8159a52 Merge pull request #5334 from luixxiul/eg
Fix minor details related to "e.g." and "API"
2024-07-29 07:47:59 +02:00
Suguru Hirahara 556f1ee958 Change eg. to e.g. 2024-07-27 22:51:10 -04:00
Suguru Hirahara 9910070c6c Sort strings on File/Strings.cs 2024-07-27 06:33:26 -04:00
Suguru Hirahara ae57dee0f0 Remove redundant space characters from *.cs and *.html 2024-07-26 00:10:31 -04:00
Suguru Hirahara a534add682 Specify correct string to OPTION_DISABLE_LENGTH_VERIFICATION 2024-07-19 04:12:50 -04:00
Grzegorz Łagocki 9b19bac7da Add Copyright Property to *.csproj files 2024-07-09 00:37:18 +02:00
Jojo-1000 917e2cd0c4 Remove obsolete custom platform detection. 2024-05-30 02:14:05 +02:00
Jojo-1000 50808c866b Merge branch 'master' into quota-disable 2024-05-11 23:46:19 +02:00
Kenneth Skovhede c49e5609a9 Merge remote-tracking branch 'origin/master' into feature/kestrel-avalonia-upgrade 2024-03-07 06:35:15 +01:00
Kenneth SkovhedeandGitHub 550b7d985d Merge pull request #5062 from Jojo-1000/improve-list-speed
Improve file backend list speed
2024-03-04 13:39:38 +01:00
Kenneth Skovhede 473c6cbbb8 Merge commit '4f577c65a4d8806f79637c50c21ca3a683c5a07a' into feature/kestrel-avalonia-upgrade 2024-03-04 12:21:53 +01:00
Kenneth Skovhede aa20088c39 Tool based upgrade of all projects with some manual update 2024-03-01 14:29:54 +01:00
Kenneth Skovhede 35cc847df7 Merge branch 'master' into feature/upgrade-to-sdk-style-projects 2024-03-01 14:28:55 +01:00
Kenneth Skovhede 40dd3c6816 Updated all license mentions to MIT 2024-02-28 15:45:30 +01:00
Kenneth Skovhede 3bf6b162ca Upgraded utility projects.
Removed redundant packages files.
Removed `mozroots` in prepare of switch to non-mono releases.
2024-02-26 08:24:48 +01:00
Kenneth Skovhede d7b6dd90be Updated all projects to use SDK-style projects using upgrade-assist 2024-02-25 16:19:25 +01:00
Jojo-1000 f7e435b1dd Improve file backend list speed.
Directly list FileInfo instead of lookups by filename. This greatly speeds up backup verify on exFAT.

Closes #5061
2023-11-19 20:04:37 +01:00
Jojo-1000 0754a5cd72 Ignore File backend quota if total size is zero.
Mono sometimes reports the total size of unknown file systems as zero. Because it should be obvious when the size is actually zero, ignore the quota in this case.
2023-07-16 19:24:37 +02:00
Thomas Suckow 78197453a1 Merge remote-tracking branch master into feature/net5-avalonia
# Conflicts:
#	Duplicati CommandLine Only.sln
#	Duplicati.sln
#	Duplicati/CommandLine/BackendTester/Duplicati.CommandLine.BackendTester.csproj
#	Duplicati/CommandLine/BackendTool/Duplicati.CommandLine.BackendTool.csproj
#	Duplicati/CommandLine/Duplicati.CommandLine.csproj
#	Duplicati/CommandLine/RecoveryTool/Duplicati.CommandLine.RecoveryTool.csproj
#	Duplicati/GUI/Duplicati.GUI.TrayIcon/Duplicati.GUI.TrayIcon.csproj
#	Duplicati/GUI/Duplicati.GUI.TrayIcon/app.config
#	Duplicati/Library/AutoUpdater/UpdaterManager.cs
#	Duplicati/Library/Backend/Jottacloud/Duplicati.Library.Backend.Jottacloud.csproj
#	Duplicati/Library/Main/Duplicati.Library.Main.csproj
#	Duplicati/Library/Utility/Duplicati.Library.Utility.csproj
#	Duplicati/Library/Utility/Utility.cs
#	Duplicati/Server/Duplicati.Server.csproj
#	Duplicati/Server/app.config
#	Duplicati/Service/app.config
#	Duplicati/UnitTest/BackendToolTests.cs
#	Duplicati/UnitTest/Duplicati.UnitTest.csproj
#	guiTests/guiTest.py
2022-11-11 21:40:08 -08:00
Kenneth Skovhede b4eeb4542b Added checks to re-enable --use-move-for-put.
This fixes #4745
2022-06-14 22:44:15 +02:00
Thomas Suckow 8c518f7d3a .net6 2022-04-12 21:43:50 -07:00
Doug Krahmer 1cbe2643b1 Add file size verification to FileBackend PutAsync() 2022-03-18 11:13:19 -07:00
Thomas Suckow d528703fe7 Merge branch 'master' into experiment/net5-split
# Conflicts:
#	.github/workflows/tests.yml
#	Duplicati.sln
#	Duplicati/CommandLine/BackendTester/Duplicati.CommandLine.BackendTester.csproj
#	Duplicati/CommandLine/BackendTool/Duplicati.CommandLine.BackendTool.csproj
#	Duplicati/CommandLine/Duplicati.CommandLine.csproj
#	Duplicati/CommandLine/RecoveryTool/Duplicati.CommandLine.RecoveryTool.csproj
#	Duplicati/GUI/Duplicati.GUI.TrayIcon/Duplicati.GUI.TrayIcon.csproj
#	Duplicati/Library/Backend/AzureBlob/AzureBlobWrapper.cs
#	Duplicati/Library/Backend/Mega/Duplicati.Library.Backend.Mega.csproj
#	Duplicati/Library/Backend/Mega/packages.config
#	Duplicati/Library/Backend/OAuthHelper/Duplicati.Library.OAuthHelper.csproj
#	Duplicati/Library/Backend/Tardigrade/Duplicati.Library.Backend.Tardigrade.csproj
#	Duplicati/Library/Backend/Tardigrade/Properties/AssemblyInfo.cs
#	Duplicati/Library/Backend/Tardigrade/packages.config
#	Duplicati/Library/Common/Duplicati.Library.Common.csproj
#	Duplicati/Library/Common/IO/SystemIOWindows.cs
#	Duplicati/Library/Modules/Builtin/Duplicati.Library.Modules.Builtin.csproj
#	Duplicati/Library/Modules/Builtin/packages.config
#	Duplicati/Library/Utility/Utility.cs
#	Duplicati/License/Duplicati.License.csproj
#	Duplicati/Server/Duplicati.Server.csproj
#	Duplicati/Server/packages.config
#	Duplicati/UnitTest/Duplicati.UnitTest.csproj
2022-02-22 19:04:01 -08:00