|
@@ -283,10 +283,6 @@ class FileProvider: NSFileProviderExtension {
|
|
|
return
|
|
|
}
|
|
|
|
|
|
- guard let directory = NCManageDatabase.sharedInstance.getTableDirectory(predicate: NSPredicate(format: "account = %@ AND serverUrl = %@", account, serverUrl)) else {
|
|
|
- return
|
|
|
- }
|
|
|
-
|
|
|
uploading.append(identifier.rawValue)
|
|
|
|
|
|
_ = ocNetworking?.uploadFileNameServerUrl(serverUrl+"/"+fileName, fileNameLocalPath: url.path, success: { (fileID, etag, date) in
|
|
@@ -315,10 +311,13 @@ class FileProvider: NSFileProviderExtension {
|
|
|
|
|
|
self.uploading = self.uploading.filter() { $0 != identifier.rawValue }
|
|
|
|
|
|
- let itemDirectory = NSFileProviderItemIdentifier(directory.fileID)
|
|
|
- NSFileProviderManager.default.signalEnumerator(for: itemDirectory, completionHandler: { (error) in
|
|
|
+ if let directory = NCManageDatabase.sharedInstance.getTableDirectory(predicate: NSPredicate(format: "account = %@ AND serverUrl = %@", account, serverUrl)) {
|
|
|
+
|
|
|
+ let itemDirectory = NSFileProviderItemIdentifier(directory.fileID)
|
|
|
+ NSFileProviderManager.default.signalEnumerator(for: itemDirectory, completionHandler: { (error) in
|
|
|
//
|
|
|
- })
|
|
|
+ })
|
|
|
+ }
|
|
|
|
|
|
}, failure: { (message, errorCode) in
|
|
|
|