Commit graph

19281 commits

Author SHA1 Message Date
Claudio Cambra
4e536dcd65
Ensure upload errors for modified files are recorded in FileProviderExtension
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:21:35 +08:00
Claudio Cambra
f4be264eee
Ensure existing metadatas being uploaded are set to uploading status in FileProviderExtension
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:21:35 +08:00
Claudio Cambra
9083f982d9
Use completion handler to retrieve updated metadata after status change, fixing race condition in FileProviderDatabaseManager
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:21:35 +08:00
Claudio Cambra
7967ced04e
Properly handle logging interpolation in NextcloudFilesDatabaseManager
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:21:35 +08:00
Claudio Cambra
c88fb7fb3e
Do not hide interpolated log strings in FileProviderSocketLineProcessor
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:21:35 +08:00
Claudio Cambra
5ae1936328
Handle different interpolated string types differently in FileProviderExtension logging
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:21:35 +08:00
Claudio Cambra
89164d99ec
Make privacy level of interpolated strings in FileProviderEnumerator logging more granular
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:21:35 +08:00
Claudio Cambra
3082850e68
Ensure errors are always publicly displayed in unified logging of File Provider
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:21:34 +08:00
Claudio Cambra
545fe6d56e
Finish replacing NSLog with use of Logger in LocalFilesUtils
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:21:34 +08:00
Claudio Cambra
810c7d0b19
Also use logger in FileProviderSocketLineProcessor
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:21:34 +08:00
Claudio Cambra
854b11e477
Use Logger materialisedFileHandling for logging in FileProviderMaterialisedEnumerationObserver
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:21:34 +08:00
Claudio Cambra
5c72c6a2e9
Replace NSLog in FileProviderExtension with use of Logger
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:21:34 +08:00
Claudio Cambra
75f18b8bd5
Use enumeration category and logger for FileProviderEnumerator
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:21:34 +08:00
Claudio Cambra
b16bf24949
Improve logging in files database manager with use of Logger
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:21:34 +08:00
Claudio Cambra
0f6ceef06f
Add a logger extensions to use system unified logging in File Provider components
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:21:34 +08:00
Claudio Cambra
8994f31cb9
Remove unnecessary full reimport after initial account configuration in FileProviderExtension
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:21:33 +08:00
Claudio Cambra
7863ba8594
Improve error handling in fetchContents if path is not available FileProviderExtension
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:21:33 +08:00
Claudio Cambra
68044891f0
Properly respond to errors in working set enumerateItems in FileProviderEnumerator
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:21:33 +08:00
Claudio Cambra
287c98f7f5
Add directoryMetadataLogString convenience method for logging in NextcloudFilesDatabaseManager
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:21:33 +08:00
Claudio Cambra
134e373f1b
Do not delete "no longer existing files" when doing enumeration of items in FileProviderEnumerator
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:21:33 +08:00
Claudio Cambra
b532b96937
Add helper itemMetadataLogString static func for logging in NextcloudFilesDatabaseManager
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:21:33 +08:00
Claudio Cambra
2ca2609e0c
Properly write item metadata status update to database in NextcloudFilesDatabaseManager
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:21:33 +08:00
Claudio Cambra
017de893f0
Run poll timer for enumerator signalling to notify accounts without push notifications in FileProviderDomainManager
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:21:33 +08:00
Claudio Cambra
bb2718824c
Use new convenience method to check if push notifications ready for account in FileProviderDomainManager
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:21:32 +08:00
Claudio Cambra
4901b0653f
Add convenience method to retrieve registered domain ids in private FileProviderDomainManager class
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:21:32 +08:00
Claudio Cambra
9dfa3d76a7
Add some additional converters for domain and account identifiers in FileProviderDomainManager
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:21:32 +08:00
Claudio Cambra
fd87bffeef
Signal enumerator after reconnecting file provider domain
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:21:32 +08:00
Claudio Cambra
89d48ec8cc
Submit tasks to do after readding file provider domain as completion blocks
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:21:32 +08:00
Claudio Cambra
002a75bca1
Add completion handler to readdFileProviderDomain method in fileproviderdomainmanager
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:21:32 +08:00
Claudio Cambra
810fa8d1ce
Handle situations where we might not get a manager for our desired domain in fileproviderdomainmanager
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:21:32 +08:00
Claudio Cambra
520e0cf2c6
Add readdFileProviderDomain convenience method to fileproviderdomainmanager
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:21:32 +08:00
Claudio Cambra
29f346d494
Ensure that wipeAllFileProviderDomains doesn't break on macOS 11
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:21:31 +08:00
Claudio Cambra
d31a8be85c
Ensure registered domains are added and removed at appropriate times in fileproviderdomainmanager
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:21:31 +08:00
Claudio Cambra
412fd0887e
Provide file provider errors in FileProviderExtension methods
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:21:31 +08:00
Claudio Cambra
b9b408d606
Fix general error handling in FileProviderEnumerator
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:21:31 +08:00
Claudio Cambra
3873ad126d
Use NKError extension properties instead of magic numbers in FileProviderEnumerator
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:21:31 +08:00
Claudio Cambra
1ee6d1a1cc
Improve handling of no changes return in readFileOrFolder throughout FileProviderEnumerator
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:21:31 +08:00
Claudio Cambra
6ffbb5abf6
Properly handle stopping when finding matching etags in readServerUrl of FileProviderEnumerator
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:21:31 +08:00
Claudio Cambra
d639baeea0
Add no changes error code in NKError extension
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:21:31 +08:00
Claudio Cambra
a0c819fdbe
Make NKError extension conversion more legible
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:21:30 +08:00
Claudio Cambra
109258f3ce
Use NKError extension method in FileProviderEnumerator enumerate methods
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:21:30 +08:00
Claudio Cambra
fdaf0d5aa5
Add NKError extension to make conversion to FileProviderError easier
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:21:30 +08:00
Claudio Cambra
6ef4f8a4f4
Implement better error handling in enumerator changes
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:21:30 +08:00
Claudio Cambra
d1008df429
Respond to materializedItemsDidChange in FileProviderExtension
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:21:30 +08:00
Claudio Cambra
20363bd241
Add completion handler to materialised observer
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:21:30 +08:00
Claudio Cambra
61890ddd72
Added FileProviderMaterialisedEnumerationObserver to handle clean up operations after materialisation changes
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:21:30 +08:00
Claudio Cambra
52f5b6a524
Split up the huge NextcloudFilesDatabaseTables file into separate files for each table schema
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:21:30 +08:00
Claudio Cambra
32e5dbad4a
Rename misleading FileProviderFilesUtils to LocalFilesUtils
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:21:29 +08:00
Claudio Cambra
c24ed9b7ac
Remove isFileSynced function which does not work as intended
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:21:29 +08:00
Claudio Cambra
1d1578447e
Move parentItemIdentifierMetadata helper method to the database manager
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-05-12 13:21:29 +08:00