|
@@ -614,19 +614,9 @@
|
|
|
}
|
|
|
|
|
|
if (itemDto.isDirectory) {
|
|
|
- (void)[[NCManageDatabase sharedInstance] addDirectoryWithEncrypted:itemDto.isEncrypted favorite:itemDto.isFavorite fileID:itemDto.ocId etag:itemDto.etag permissions:itemDto.permissions serverUrl:[CCUtility stringAppendServerUrl:serverUrl addFileName:fileName] account:account];
|
|
|
+ (void)[[NCManageDatabase sharedInstance] addDirectoryWithEncrypted:itemDto.isEncrypted favorite:itemDto.isFavorite fileID:itemDto.ocId permissions:itemDto.permissions serverUrl:[CCUtility stringAppendServerUrl:serverUrl addFileName:fileName] account:account];
|
|
|
}
|
|
|
|
|
|
- // ----- BUG #942 ---------
|
|
|
- if ([itemDto.etag length] == 0) {
|
|
|
- #ifndef EXTENSION
|
|
|
- AppDelegate *appDelegate = (AppDelegate *)[[UIApplication sharedApplication] delegate];
|
|
|
- [appDelegate messageNotification:@"Server error" description:@"Metadata etag absent, record excluded, please fix" visible:YES delay:k_dismissAfterSecond type:TWMessageBarMessageTypeError errorCode:k_CCErrorInternalError];
|
|
|
- #endif
|
|
|
- continue;
|
|
|
- }
|
|
|
- // ------------------------
|
|
|
-
|
|
|
[metadatas addObject:[CCUtility trasformedOCFileToCCMetadata:itemDto fileName:itemDto.fileName serverUrl:serverUrl autoUploadFileName:autoUploadFileName autoUploadDirectory:autoUploadDirectory activeAccount:account isFolderEncrypted:isFolderEncrypted]];
|
|
|
}
|
|
|
|
|
@@ -821,23 +811,13 @@
|
|
|
} else
|
|
|
continue;
|
|
|
|
|
|
- // ----- BUG #942 ---------
|
|
|
- if ([itemDto.etag length] == 0) {
|
|
|
-#ifndef EXTENSION
|
|
|
- AppDelegate *appDelegate = (AppDelegate *)[[UIApplication sharedApplication] delegate];
|
|
|
- [appDelegate messageNotification:@"Server error" description:@"Metadata etag absent, record excluded, please fix" visible:YES delay:k_dismissAfterSecond type:TWMessageBarMessageTypeError errorCode:k_CCErrorInternalError];
|
|
|
-#endif
|
|
|
- continue;
|
|
|
- }
|
|
|
- // ------------------------
|
|
|
-
|
|
|
NSRange firstInstance = [itemDto.filePath rangeOfString:[NSString stringWithFormat:@"%@/files/%@", k_dav, _activeUserID]];
|
|
|
NSString *serverPath = [itemDto.filePath substringFromIndex:firstInstance.length+firstInstance.location+1];
|
|
|
if ([serverPath hasSuffix:@"/"]) serverPath = [serverPath substringToIndex:[serverPath length] - 1];
|
|
|
serverUrl = [CCUtility stringAppendServerUrl:[_activeUrl stringByAppendingString:k_webDAV] addFileName:serverPath];
|
|
|
|
|
|
if (itemDto.isDirectory) {
|
|
|
- (void)[[NCManageDatabase sharedInstance] addDirectoryWithEncrypted:itemDto.isEncrypted favorite:itemDto.isFavorite fileID:itemDto.ocId etag:itemDto.etag permissions:itemDto.permissions serverUrl:[NSString stringWithFormat:@"%@/%@", serverUrl, fileName] account:_metadataNet.account];
|
|
|
+ (void)[[NCManageDatabase sharedInstance] addDirectoryWithEncrypted:itemDto.isEncrypted favorite:itemDto.isFavorite fileID:itemDto.ocId permissions:itemDto.permissions serverUrl:[NSString stringWithFormat:@"%@/%@", serverUrl, fileName] account:_metadataNet.account];
|
|
|
}
|
|
|
|
|
|
isFolderEncrypted = [CCUtility isFolderEncrypted:serverUrl account:_metadataNet.account];
|
|
@@ -974,23 +954,13 @@
|
|
|
} else
|
|
|
continue;
|
|
|
|
|
|
- // ----- BUG #942 ---------
|
|
|
- if ([itemDto.etag length] == 0) {
|
|
|
- #ifndef EXTENSION
|
|
|
- AppDelegate *appDelegate = (AppDelegate *)[[UIApplication sharedApplication] delegate];
|
|
|
- [appDelegate messageNotification:@"Server error" description:@"Metadata etag absent, record excluded, please fix" visible:YES delay:k_dismissAfterSecond type:TWMessageBarMessageTypeError errorCode:k_CCErrorInternalError];
|
|
|
- #endif
|
|
|
- continue;
|
|
|
- }
|
|
|
- // ------------------------
|
|
|
-
|
|
|
NSRange firstInstance = [itemDto.filePath rangeOfString:[NSString stringWithFormat:@"%@/files/%@", k_dav, _activeUserID]];
|
|
|
NSString *serverPath = [itemDto.filePath substringFromIndex:firstInstance.length+firstInstance.location+1];
|
|
|
if ([serverPath hasSuffix:@"/"]) serverPath = [serverPath substringToIndex:[serverPath length] - 1];
|
|
|
serverUrl = [CCUtility stringAppendServerUrl:[_activeUrl stringByAppendingString:k_webDAV] addFileName:serverPath];
|
|
|
|
|
|
if (itemDto.isDirectory) {
|
|
|
- (void)[[NCManageDatabase sharedInstance] addDirectoryWithEncrypted:itemDto.isEncrypted favorite:itemDto.isFavorite fileID:itemDto.ocId etag:itemDto.etag permissions:itemDto.permissions serverUrl:[NSString stringWithFormat:@"%@/%@", serverUrl, fileName] account:account];
|
|
|
+ (void)[[NCManageDatabase sharedInstance] addDirectoryWithEncrypted:itemDto.isEncrypted favorite:itemDto.isFavorite fileID:itemDto.ocId permissions:itemDto.permissions serverUrl:[NSString stringWithFormat:@"%@/%@", serverUrl, fileName] account:account];
|
|
|
}
|
|
|
|
|
|
isFolderEncrypted = [CCUtility isFolderEncrypted:serverUrl account:account];
|