|
@@ -477,8 +477,9 @@
|
|
|
- (BOOL)createFolderSubFolderAutoUploadFolderPhotos:(NSString *)folderPhotos useSubFolder:(BOOL)useSubFolder assets:(PHFetchResult *)assets selector:(NSString *)selector
|
|
|
{
|
|
|
NSString *fileID;
|
|
|
- BOOL encrypted = [CCUtility isFolderEncrypted:folderPhotos account:appDelegate.activeAccount depth:YES];
|
|
|
+ BOOL encrypted;
|
|
|
|
|
|
+ encrypted = [CCUtility isFolderEncrypted:folderPhotos account:appDelegate.activeAccount depth:YES];
|
|
|
NSError *error = [[NCNetworkingSync sharedManager] createFolderAutomaticUpload:folderPhotos user:appDelegate.activeUser userID:appDelegate.activeUserID password:appDelegate.activePassword url:appDelegate.activeUrl encrypted:encrypted fileID:&fileID];
|
|
|
|
|
|
if (error == nil) {
|
|
@@ -503,16 +504,19 @@
|
|
|
|
|
|
for (NSString *dateSubFolder in [CCUtility createNameSubFolder:assets]) {
|
|
|
|
|
|
- error = [[NCNetworkingSync sharedManager] createFolderAutomaticUpload:[NSString stringWithFormat:@"%@/%@", folderPhotos, dateSubFolder] user:appDelegate.activeUser userID:appDelegate.activeUserID password:appDelegate.activePassword url:appDelegate.activeUrl encrypted:encrypted fileID:&fileID];
|
|
|
+ NSString *folderPathName = [NSString stringWithFormat:@"%@/%@", folderPhotos, dateSubFolder];
|
|
|
+ encrypted = [CCUtility isFolderEncrypted:folderPathName account:appDelegate.activeAccount depth:YES];
|
|
|
+
|
|
|
+ error = [[NCNetworkingSync sharedManager] createFolderAutomaticUpload:folderPathName user:appDelegate.activeUser userID:appDelegate.activeUserID password:appDelegate.activePassword url:appDelegate.activeUrl encrypted:encrypted fileID:&fileID];
|
|
|
|
|
|
if ( error == nil) {
|
|
|
|
|
|
- (void)[[NCManageDatabase sharedInstance] addDirectoryWithServerUrl:[NSString stringWithFormat:@"%@/%@", folderPhotos, dateSubFolder] fileID:fileID permissions:nil encrypted:encrypted];
|
|
|
+ (void)[[NCManageDatabase sharedInstance] addDirectoryWithServerUrl:folderPathName fileID:fileID permissions:nil encrypted:encrypted];
|
|
|
|
|
|
} else {
|
|
|
|
|
|
// Activity
|
|
|
- [[NCManageDatabase sharedInstance] addActivityClient:[NSString stringWithFormat:@"%@/%@", folderPhotos, dateSubFolder] fileID:@"" action:k_activityDebugActionAutoUpload selector:selector note:NSLocalizedString(@"_error_createsubfolders_upload_",nil) type:k_activityTypeFailure verbose:k_activityVerboseDefault activeUrl:appDelegate.activeUrl];
|
|
|
+ [[NCManageDatabase sharedInstance] addActivityClient:folderPathName fileID:@"" action:k_activityDebugActionAutoUpload selector:selector note:NSLocalizedString(@"_error_createsubfolders_upload_",nil) type:k_activityTypeFailure verbose:k_activityVerboseDefault activeUrl:appDelegate.activeUrl];
|
|
|
|
|
|
if ([selector isEqualToString:selectorUploadAutoUploadAll])
|
|
|
[appDelegate messageNotification:@"_error_" description:@"_error_createsubfolders_upload_" visible:YES delay:k_dismissAfterSecond type:TWMessageBarMessageTypeError errorCode:0];
|