nextcloud-desktop.git
3 years agoSplit directory item metadata handling in database to new NextcloudFilesDatabaseManag...
Claudio Cambra [Tue, 4 Apr 2023 08:24:17 +0000 (16:24 +0800)]
Split directory item metadata handling in database to new NextcloudFilesDatabaseManager extension

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
3 years agoCorrectly report child item count for folders in FileProviderItem
Claudio Cambra [Tue, 4 Apr 2023 07:56:29 +0000 (15:56 +0800)]
Correctly report child item count for folders in FileProviderItem

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
3 years agoAdd convenience method for NextcloudFilesDatabaseManager to get child items of a...
Claudio Cambra [Tue, 4 Apr 2023 07:52:20 +0000 (15:52 +0800)]
Add convenience method for NextcloudFilesDatabaseManager to get child items of a directory

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
3 years agoFix query of childDirectoriesForDirectory in NextcloudFilesDatabaseManager
Claudio Cambra [Tue, 4 Apr 2023 07:49:33 +0000 (15:49 +0800)]
Fix query of childDirectoriesForDirectory in NextcloudFilesDatabaseManager

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
3 years agoProperly report modification date for FileProviderItem
Claudio Cambra [Mon, 3 Apr 2023 10:22:38 +0000 (18:22 +0800)]
Properly report modification date for FileProviderItem

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
3 years agoUse consistent if defined in application.cpp
Claudio Cambra [Wed, 22 Mar 2023 13:29:57 +0000 (14:29 +0100)]
Use consistent if defined in application.cpp

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
3 years agoRename FileProviderDomainManager::Private to FileProviderDomainManager::MacImplementation
Claudio Cambra [Wed, 22 Mar 2023 13:25:15 +0000 (14:25 +0100)]
Rename FileProviderDomainManager::Private to FileProviderDomainManager::MacImplementation

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
3 years agoSet interpolated log strings in FileProvider logs to public
Claudio Cambra [Tue, 21 Mar 2023 15:29:21 +0000 (16:29 +0100)]
Set interpolated log strings in FileProvider logs to public

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
3 years agoSplit client interfacing code into FileProviderExtension extension
Claudio Cambra [Tue, 21 Mar 2023 12:28:48 +0000 (13:28 +0100)]
Split client interfacing code into FileProviderExtension extension

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
3 years agoMake NKError extension code more Swift-like, clean up
Claudio Cambra [Tue, 21 Mar 2023 12:21:51 +0000 (13:21 +0100)]
Make NKError extension code more Swift-like, clean up

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
3 years agoRemove readdFileProviderDomain hack in FileProviderDomainManager
Claudio Cambra [Mon, 20 Mar 2023 17:04:41 +0000 (18:04 +0100)]
Remove readdFileProviderDomain hack in FileProviderDomainManager

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
3 years agoUse specific signalEnumerator method in FileProviderExtension item renaming instead...
Claudio Cambra [Mon, 20 Mar 2023 15:15:39 +0000 (16:15 +0100)]
Use specific signalEnumerator method in FileProviderExtension item renaming instead of reinventing wheel

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
3 years agoFix unused/unmodified variable definition warnings in FileProviderEnumerator
Claudio Cambra [Mon, 20 Mar 2023 15:14:59 +0000 (16:14 +0100)]
Fix unused/unmodified variable definition warnings in FileProviderEnumerator

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
3 years agoEnsure we return deleted metadata directory copy rather than live fire realm object...
Claudio Cambra [Mon, 20 Mar 2023 15:14:35 +0000 (16:14 +0100)]
Ensure we return deleted metadata directory copy rather than live fire realm object in recursive delete of NextcloudFilesDatabaseManager

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
3 years agoParallelise conversion of NKFiles to NextcloudItemMetadataTables
Claudio Cambra [Mon, 20 Mar 2023 14:02:29 +0000 (15:02 +0100)]
Parallelise conversion of NKFiles to NextcloudItemMetadataTables

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
3 years agoProperly handle metadata delete after item deletion in FileProviderExtension
Claudio Cambra [Mon, 20 Mar 2023 13:56:41 +0000 (14:56 +0100)]
Properly handle metadata delete after item deletion in FileProviderExtension

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
3 years agoFix recursive metadata delete in NextcloudFilesDatabaseManager
Claudio Cambra [Mon, 20 Mar 2023 13:51:54 +0000 (14:51 +0100)]
Fix recursive metadata delete in NextcloudFilesDatabaseManager

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
3 years agoMove NKFile to metadata conversion methods to a new extension for NextcloudItemMetada...
Claudio Cambra [Mon, 20 Mar 2023 13:29:14 +0000 (14:29 +0100)]
Move NKFile to metadata conversion methods to a new extension for NextcloudItemMetadataTable, where they are better placed

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
3 years agoPrevent multi-thread modification of the same array with serial array modification...
Claudio Cambra [Mon, 20 Mar 2023 12:16:24 +0000 (13:16 +0100)]
Prevent multi-thread modification of the same array with serial array modification dispatch queue when enumerating items in FileProviderEnumerator

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
3 years agoReintegrate sync engine into FileProviderEnumerator class
Claudio Cambra [Sat, 18 Mar 2023 22:36:25 +0000 (23:36 +0100)]
Reintegrate sync engine into FileProviderEnumerator class

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
3 years agoSimplify initial item enumeration, no need to fetch from database in FileProviderEnum...
Claudio Cambra [Sat, 18 Mar 2023 22:35:10 +0000 (23:35 +0100)]
Simplify initial item enumeration, no need to fetch from database in FileProviderEnumerator

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
3 years agoPerform slow metadata to FileProviderItem conversion concurrently in FileProviderEnum...
Claudio Cambra [Sat, 18 Mar 2023 20:35:12 +0000 (21:35 +0100)]
Perform slow metadata to FileProviderItem conversion concurrently in FileProviderEnumerator

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
3 years agoFix children serverurl rename in file provider nc files database
Claudio Cambra [Sat, 18 Mar 2023 20:33:02 +0000 (21:33 +0100)]
Fix children serverurl rename in file provider nc files database

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
3 years agoRemove redundant double read of serverUrl when often we always want to do a depth...
Claudio Cambra [Sat, 18 Mar 2023 20:32:26 +0000 (21:32 +0100)]
Remove redundant double read of serverUrl when often we always want to do a depth 1 read in NextcloudSyncEngine

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
3 years agoMake sure to include new metadatas in folders to scan for changes in recursive scan...
Claudio Cambra [Sat, 18 Mar 2023 19:11:36 +0000 (20:11 +0100)]
Make sure to include new metadatas in folders to scan for changes in recursive scan of NextcloudSyncEngine

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
3 years agoMake sure to notify when folder moved in FileProviderExtension
Claudio Cambra [Sat, 18 Mar 2023 19:07:35 +0000 (20:07 +0100)]
Make sure to notify when folder moved in FileProviderExtension

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
3 years agoFix unsetting of etags on directories (and only) directories on update
Claudio Cambra [Sat, 18 Mar 2023 19:01:53 +0000 (20:01 +0100)]
Fix unsetting of etags on directories (and only) directories on update

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
3 years agoFix recursive directory metadata renaming order
Claudio Cambra [Sat, 18 Mar 2023 19:01:29 +0000 (20:01 +0100)]
Fix recursive directory metadata renaming order

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
3 years agoDo not do specific enumeration of items working set in FileProviderEnumerator
Claudio Cambra [Sat, 18 Mar 2023 18:01:10 +0000 (19:01 +0100)]
Do not do specific enumeration of items working set in FileProviderEnumerator

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
3 years agoEnsure we do not set etag if we have set updateDirectoryEtags to false in NextcloudFi...
Claudio Cambra [Sat, 18 Mar 2023 18:00:25 +0000 (19:00 +0100)]
Ensure we do not set etag if we have set updateDirectoryEtags to false in NextcloudFilesDatabaseManager updateItemMetadatas

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
3 years agoMove remote sync functionality out of enumerator and into separate NextcloudSyncEngin...
Claudio Cambra [Sat, 18 Mar 2023 17:04:19 +0000 (18:04 +0100)]
Move remote sync functionality out of enumerator and into separate NextcloudSyncEngine class

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
3 years agoProgressively enumerate items as we get them for working set
Claudio Cambra [Sat, 18 Mar 2023 15:44:30 +0000 (16:44 +0100)]
Progressively enumerate items as we get them for working set

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
3 years agoMove conversion from NSData to NSFileProviderPage to separate func
Claudio Cambra [Sat, 18 Mar 2023 15:35:59 +0000 (16:35 +0100)]
Move conversion from NSData to NSFileProviderPage to separate func

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
3 years agoSplit metadata parsing to complete enumerator into own function
Claudio Cambra [Sat, 18 Mar 2023 15:27:32 +0000 (16:27 +0100)]
Split metadata parsing to complete enumerator into own function

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
3 years agoSimplify enumerateItems of working set by using fullRecursiveScan in FileProviderEnum...
Claudio Cambra [Sat, 18 Mar 2023 12:58:27 +0000 (13:58 +0100)]
Simplify enumerateItems of working set by using fullRecursiveScan in FileProviderEnumerator

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
3 years agoHandle invalidation of enumerator during long recursive scans in FileProviderEnumerator
Claudio Cambra [Sat, 18 Mar 2023 15:05:34 +0000 (16:05 +0100)]
Handle invalidation of enumerator during long recursive scans in FileProviderEnumerator

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
3 years agoFix recursive scan when scanChangesOnly is false in FileProviderEnumerator
Claudio Cambra [Sat, 18 Mar 2023 14:49:20 +0000 (15:49 +0100)]
Fix recursive scan when scanChangesOnly is false in FileProviderEnumerator

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
3 years agoMove deleted/updated conflict check to fullRecursiveScan in FileProviderEnumerator...
Claudio Cambra [Sat, 18 Mar 2023 13:10:24 +0000 (14:10 +0100)]
Move deleted/updated conflict check to fullRecursiveScan in FileProviderEnumerator+RemoteSync

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
3 years agoProperly report and handle critical errors during recursive enumeration in FileProvid...
Claudio Cambra [Sat, 18 Mar 2023 12:57:02 +0000 (13:57 +0100)]
Properly report and handle critical errors during recursive enumeration in FileProviderEnumerator

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
3 years agoMove remote sync stuff in FileProviderEnumerator to own file
Claudio Cambra [Sat, 18 Mar 2023 12:41:31 +0000 (13:41 +0100)]
Move remote sync stuff in FileProviderEnumerator to own file

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
3 years agoProperly report deleted metadatas in recursive directory delete in FileProviderEnumerator
Claudio Cambra [Sat, 18 Mar 2023 12:24:37 +0000 (13:24 +0100)]
Properly report deleted metadatas in recursive directory delete in FileProviderEnumerator

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
3 years agoFavour straight return in updateItemMetadatas rather than unnecessary completionHandl...
Claudio Cambra [Sat, 18 Mar 2023 12:23:53 +0000 (13:23 +0100)]
Favour straight return in updateItemMetadatas rather than unnecessary completionHandler in NextcloudFilesDatabaseManager

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
3 years agoFix renaming directories remotely fixing local sync state in file provider
Claudio Cambra [Sat, 18 Mar 2023 03:41:47 +0000 (04:41 +0100)]
Fix renaming directories remotely fixing local sync state in file provider

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
3 years agoDo not update etags for child folders acquired in a depth 1 readServerUrl in FileProv...
Claudio Cambra [Sat, 18 Mar 2023 01:35:02 +0000 (02:35 +0100)]
Do not update etags for child folders acquired in a depth 1 readServerUrl in FileProviderEnumerator

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
3 years agoRemove redundant directory metadata tables in File Provider
Claudio Cambra [Sat, 18 Mar 2023 00:43:05 +0000 (01:43 +0100)]
Remove redundant directory metadata tables in File Provider

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
3 years agoPrevent premature running of completion handler when modifying folder in FileProvider...
Claudio Cambra [Fri, 17 Mar 2023 22:38:21 +0000 (23:38 +0100)]
Prevent premature running of completion handler when modifying folder in FileProviderExtension

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
3 years agoChange fullRecursiveScan function to enable more than just look for changes, also...
Claudio Cambra [Fri, 17 Mar 2023 22:27:59 +0000 (23:27 +0100)]
Change fullRecursiveScan function to enable more than just look for changes, also do proper full scan

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
3 years agoEnsure we are not marking items as both updated and deleted in FileProviderEnumerator
Claudio Cambra [Fri, 17 Mar 2023 19:37:22 +0000 (20:37 +0100)]
Ensure we are not marking items as both updated and deleted in FileProviderEnumerator

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
3 years agoEnsure xcodebuild uses the Info.plist file verbatim
Claudio Cambra [Fri, 17 Mar 2023 15:04:17 +0000 (16:04 +0100)]
Ensure xcodebuild uses the Info.plist file verbatim

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
3 years agoFix FileProviderExt bundle identifier
Claudio Cambra [Fri, 17 Mar 2023 14:18:27 +0000 (15:18 +0100)]
Fix FileProviderExt bundle identifier

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
3 years agoOnly set CODE_SIGN_INJECT_BASE_ENTITLEMENTS=NO in FileProviderExt for release configu...
Ivan Sein [Fri, 17 Mar 2023 12:01:43 +0000 (13:01 +0100)]
Only set CODE_SIGN_INJECT_BASE_ENTITLEMENTS=NO in FileProviderExt for release configuration.

Signed-off-by: Ivan Sein <ivan@nextcloud.com>
3 years agoSet CODE_SIGN_INJECT_BASE_ENTITLEMENTS=NO in FileProviderExt.
Ivan Sein [Fri, 17 Mar 2023 10:19:02 +0000 (11:19 +0100)]
Set CODE_SIGN_INJECT_BASE_ENTITLEMENTS=NO in FileProviderExt.

Signed-off-by: Ivan Sein <ivan@nextcloud.com>
3 years agoDisable automatically manage signing in FileProviderExt target.
Ivan Sein [Thu, 16 Mar 2023 21:48:57 +0000 (22:48 +0100)]
Disable automatically manage signing in FileProviderExt target.

Signed-off-by: Ivan Sein <ivan@nextcloud.com>
3 years agoUse Nextcloud team id.
Ivan Sein [Thu, 16 Mar 2023 15:18:58 +0000 (16:18 +0100)]
Use Nextcloud team id.

Signed-off-by: Ivan Sein <ivan@nextcloud.com>
3 years agoDo not use QSharedPointer to store FileProviderSocketControllers, use QPointer
Claudio Cambra [Wed, 15 Mar 2023 16:56:56 +0000 (17:56 +0100)]
Do not use QSharedPointer to store FileProviderSocketControllers, use QPointer

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
3 years agoEnsure we are logging error description itself and not NKError wrapper or any Error...
Claudio Cambra [Wed, 15 Mar 2023 16:21:31 +0000 (17:21 +0100)]
Ensure we are logging error description itself and not NKError wrapper or any Error type

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
3 years agoRewrite modifyItem to make it non-blocking on the main thread in FileProviderExtension
Claudio Cambra [Wed, 15 Mar 2023 16:21:10 +0000 (17:21 +0100)]
Rewrite modifyItem to make it non-blocking on the main thread in FileProviderExtension

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
3 years agoMake CMake BUILD_FILE_PROVIDER_MODULE option only available on Apple
Claudio Cambra [Wed, 15 Mar 2023 15:32:18 +0000 (16:32 +0100)]
Make CMake BUILD_FILE_PROVIDER_MODULE option only available on Apple

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
3 years agoMove accountStateFromFileProviderDomainIdentifier to FileProviderDomainManager where...
Claudio Cambra [Wed, 15 Mar 2023 15:25:25 +0000 (16:25 +0100)]
Move accountStateFromFileProviderDomainIdentifier to FileProviderDomainManager where we have methods to guarantee conversion

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
3 years agoAdd informative messages after Q_ASSERTs for sockets in FileProviderSocketController...
Claudio Cambra [Wed, 15 Mar 2023 15:18:15 +0000 (16:18 +0100)]
Add informative messages after Q_ASSERTs for sockets in FileProviderSocketController for release mode

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
3 years agoDo not emit socketDestroyed twice in FileProviderSocketController
Claudio Cambra [Wed, 15 Mar 2023 15:05:03 +0000 (16:05 +0100)]
Do not emit socketDestroyed twice in FileProviderSocketController

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
3 years agoClean up header for FileProviderSocketController
Claudio Cambra [Wed, 15 Mar 2023 15:04:41 +0000 (16:04 +0100)]
Clean up header for FileProviderSocketController

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
3 years agoClean up FileProviderSocketServer header, remove unnecessary ifdefs
Claudio Cambra [Wed, 15 Mar 2023 15:04:12 +0000 (16:04 +0100)]
Clean up FileProviderSocketServer header, remove unnecessary ifdefs

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
3 years agoImprove initialisation of C++ FileProvider class
Claudio Cambra [Wed, 15 Mar 2023 14:54:10 +0000 (15:54 +0100)]
Improve initialisation of C++ FileProvider class

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
3 years agoMake enumeration of working set changes non-blocking in FileProviderEnumerator
Claudio Cambra [Wed, 15 Mar 2023 13:37:53 +0000 (14:37 +0100)]
Make enumeration of working set changes non-blocking in FileProviderEnumerator

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
3 years agoEnsure we are editing realm database on main thread in FileProviderEnumerator
Claudio Cambra [Wed, 15 Mar 2023 13:24:11 +0000 (14:24 +0100)]
Ensure we are editing realm database on main thread in FileProviderEnumerator

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
3 years agoFix blocking main thread when enumerating working set items in FileProviderEnumerator
Claudio Cambra [Wed, 15 Mar 2023 13:03:19 +0000 (14:03 +0100)]
Fix blocking main thread when enumerating working set items in FileProviderEnumerator

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
3 years agoLog errors in fetching local temporary file provider path
Claudio Cambra [Wed, 15 Mar 2023 12:24:28 +0000 (13:24 +0100)]
Log errors in fetching local temporary file provider path

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
3 years agoSimplify temp local file creation while fetching contents, use File Provider volume
Claudio Cambra [Wed, 15 Mar 2023 11:59:02 +0000 (12:59 +0100)]
Simplify temp local file creation while fetching contents, use File Provider volume

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
3 years agoRemove unnecessary local file operations in FileProviderExt
Claudio Cambra [Wed, 15 Mar 2023 11:47:08 +0000 (12:47 +0100)]
Remove unnecessary local file operations in FileProviderExt

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
3 years agoProperly set cancellation, pausing, and resuming handlers on FileProviderExtension...
Claudio Cambra [Wed, 15 Mar 2023 11:37:14 +0000 (12:37 +0100)]
Properly set cancellation, pausing, and resuming handlers on FileProviderExtension task progress

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
3 years agoAdd ability to set handlers from AlamoFire request on Progress extension
Claudio Cambra [Wed, 15 Mar 2023 11:36:48 +0000 (12:36 +0100)]
Add ability to set handlers from AlamoFire request on Progress extension

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
3 years agoRemoved unused tracking of outstanding session and ocID related tasks
Claudio Cambra [Wed, 15 Mar 2023 11:10:38 +0000 (12:10 +0100)]
Removed unused tracking of outstanding session and ocID related tasks

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
3 years agoDo not copy pause, cancel, and resuming handlers in Progress extension copyCurrentSta...
Claudio Cambra [Wed, 15 Mar 2023 11:09:33 +0000 (12:09 +0100)]
Do not copy pause, cancel, and resuming handlers in Progress extension copyCurrentStateToProgress by default

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
3 years agoWarn when retrieved size of file upload is different to the expected size in FileProv...
Claudio Cambra [Wed, 15 Mar 2023 10:27:14 +0000 (11:27 +0100)]
Warn when retrieved size of file upload is different to the expected size in FileProviderExtension

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
3 years agoEnsure item upload/download states are properly set and reset in FileProviderExtension
Claudio Cambra [Wed, 15 Mar 2023 10:19:30 +0000 (11:19 +0100)]
Ensure item upload/download states are properly set and reset in FileProviderExtension

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
3 years agoMake it possible to disable building file provider module
Claudio Cambra [Wed, 15 Mar 2023 10:04:19 +0000 (11:04 +0100)]
Make it possible to disable building file provider module

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
3 years agoAdd availability guards around private implementation class of FileProviderDomainManager
Claudio Cambra [Wed, 15 Mar 2023 09:47:40 +0000 (10:47 +0100)]
Add availability guards around private implementation class of FileProviderDomainManager

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
3 years agoDo not try to compile code in FileProviderDomainManager requiring FileProvider compon...
Claudio Cambra [Wed, 15 Mar 2023 09:29:16 +0000 (10:29 +0100)]
Do not try to compile code in FileProviderDomainManager requiring FileProvider components on macOS > 11.0

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
3 years agoDo not initialise file provider components if system does not support file provider
Claudio Cambra [Wed, 15 Mar 2023 09:26:10 +0000 (10:26 +0100)]
Do not initialise file provider components if system does not support file provider

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
3 years agoAdd method to detect if File Provider functionality is available or not
Claudio Cambra [Wed, 15 Mar 2023 08:58:47 +0000 (09:58 +0100)]
Add method to detect if File Provider functionality is available or not

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
3 years agoSet deployment target for FileProviderExt to macOS 11.0
Claudio Cambra [Wed, 15 Mar 2023 08:55:37 +0000 (09:55 +0100)]
Set deployment target for FileProviderExt to macOS 11.0

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
3 years agoEnsure upload errors for modified files are recorded in FileProviderExtension
Claudio Cambra [Tue, 14 Mar 2023 22:27:14 +0000 (23:27 +0100)]
Ensure upload errors for modified files are recorded in FileProviderExtension

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
3 years agoEnsure existing metadatas being uploaded are set to uploading status in FileProviderE...
Claudio Cambra [Tue, 14 Mar 2023 22:21:08 +0000 (23:21 +0100)]
Ensure existing metadatas being uploaded are set to uploading status in FileProviderExtension

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
3 years agoUse completion handler to retrieve updated metadata after status change, fixing race...
Claudio Cambra [Tue, 14 Mar 2023 22:15:02 +0000 (23:15 +0100)]
Use completion handler to retrieve updated metadata after status change, fixing race condition in FileProviderDatabaseManager

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
3 years agoProperly handle logging interpolation in NextcloudFilesDatabaseManager
Claudio Cambra [Tue, 14 Mar 2023 21:05:50 +0000 (22:05 +0100)]
Properly handle logging interpolation in NextcloudFilesDatabaseManager

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
3 years agoDo not hide interpolated log strings in FileProviderSocketLineProcessor
Claudio Cambra [Tue, 14 Mar 2023 20:36:20 +0000 (21:36 +0100)]
Do not hide interpolated log strings in FileProviderSocketLineProcessor

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
3 years agoHandle different interpolated string types differently in FileProviderExtension logging
Claudio Cambra [Tue, 14 Mar 2023 20:34:08 +0000 (21:34 +0100)]
Handle different interpolated string types differently in FileProviderExtension logging

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
3 years agoMake privacy level of interpolated strings in FileProviderEnumerator logging more...
Claudio Cambra [Tue, 14 Mar 2023 20:26:52 +0000 (21:26 +0100)]
Make privacy level of interpolated strings in FileProviderEnumerator logging more granular

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
3 years agoEnsure errors are always publicly displayed in unified logging of File Provider
Claudio Cambra [Tue, 14 Mar 2023 20:14:09 +0000 (21:14 +0100)]
Ensure errors are always publicly displayed in unified logging of File Provider

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
3 years agoFinish replacing NSLog with use of Logger in LocalFilesUtils
Claudio Cambra [Tue, 14 Mar 2023 20:07:53 +0000 (21:07 +0100)]
Finish replacing NSLog with use of Logger in LocalFilesUtils

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
3 years agoAlso use logger in FileProviderSocketLineProcessor
Claudio Cambra [Tue, 14 Mar 2023 20:07:36 +0000 (21:07 +0100)]
Also use logger in FileProviderSocketLineProcessor

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
3 years agoUse Logger materialisedFileHandling for logging in FileProviderMaterialisedEnumeratio...
Claudio Cambra [Tue, 14 Mar 2023 20:07:16 +0000 (21:07 +0100)]
Use Logger materialisedFileHandling for logging in FileProviderMaterialisedEnumerationObserver

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
3 years agoReplace NSLog in FileProviderExtension with use of Logger
Claudio Cambra [Tue, 14 Mar 2023 20:04:04 +0000 (21:04 +0100)]
Replace NSLog in FileProviderExtension with use of Logger

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
3 years agoUse enumeration category and logger for FileProviderEnumerator
Claudio Cambra [Tue, 14 Mar 2023 20:03:49 +0000 (21:03 +0100)]
Use enumeration category and logger for FileProviderEnumerator

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
3 years agoImprove logging in files database manager with use of Logger
Claudio Cambra [Tue, 14 Mar 2023 20:03:30 +0000 (21:03 +0100)]
Improve logging in files database manager with use of Logger

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
3 years agoAdd a logger extensions to use system unified logging in File Provider components
Claudio Cambra [Tue, 14 Mar 2023 20:02:25 +0000 (21:02 +0100)]
Add a logger extensions to use system unified logging in File Provider components

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
3 years agoRemove unnecessary full reimport after initial account configuration in FileProviderE...
Claudio Cambra [Tue, 14 Mar 2023 18:23:49 +0000 (19:23 +0100)]
Remove unnecessary full reimport after initial account configuration in FileProviderExtension

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
3 years agoImprove error handling in fetchContents if path is not available FileProviderExtension
Claudio Cambra [Tue, 14 Mar 2023 18:01:34 +0000 (19:01 +0100)]
Improve error handling in fetchContents if path is not available FileProviderExtension

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
3 years agoProperly respond to errors in working set enumerateItems in FileProviderEnumerator
Claudio Cambra [Tue, 14 Mar 2023 15:06:20 +0000 (16:06 +0100)]
Properly respond to errors in working set enumerateItems in FileProviderEnumerator

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>