|
@@ -475,16 +475,14 @@
|
|
|
#pragma --------------------------------------------------------------------------------------------
|
|
|
|
|
|
- (BOOL)createFolderSubFolderAutoUploadFolderPhotos:(NSString *)folderPhotos useSubFolder:(BOOL)useSubFolder assets:(PHFetchResult *)assets selector:(NSString *)selector encrypted:(BOOL)encrypted
|
|
|
-{
|
|
|
- NSError *error;
|
|
|
-
|
|
|
- error = [[NCNetworkingSync sharedManager] createFolderAutomaticUpload:folderPhotos user:appDelegate.activeUser userID:appDelegate.activeUserID password:appDelegate.activePassword encrypted:encrypted];
|
|
|
+{
|
|
|
+ NSError *error = [[NCNetworkingSync sharedManager] createFolderAutomaticUpload:folderPhotos user:appDelegate.activeUser userID:appDelegate.activeUserID password:appDelegate.activePassword url:appDelegate.activeUrl encrypted:encrypted];
|
|
|
|
|
|
if (error == nil) {
|
|
|
|
|
|
tableDirectory *tableDirectory = [[NCManageDatabase sharedInstance] getTableDirectoryWithPredicate:[NSPredicate predicateWithFormat:@"account = %@ AND serverUrl = %@", appDelegate.activeAccount, folderPhotos]];
|
|
|
if (!tableDirectory)
|
|
|
- (void)[[NCManageDatabase sharedInstance] addDirectoryWithServerUrl:folderPhotos permissions:nil encrypted:false];
|
|
|
+ (void)[[NCManageDatabase sharedInstance] addDirectoryWithServerUrl:folderPhotos permissions:nil encrypted:encrypted];
|
|
|
|
|
|
} else {
|
|
|
|
|
@@ -502,11 +500,11 @@
|
|
|
|
|
|
for (NSString *dateSubFolder in [CCUtility createNameSubFolder:assets]) {
|
|
|
|
|
|
- error = [[NCNetworkingSync sharedManager] createFolderAutomaticUpload:[NSString stringWithFormat:@"%@/%@", folderPhotos, dateSubFolder] user:appDelegate.activeUser userID:appDelegate.activeUserID password:appDelegate.activePassword encrypted:encrypted];
|
|
|
+ error = [[NCNetworkingSync sharedManager] createFolderAutomaticUpload:[NSString stringWithFormat:@"%@/%@", folderPhotos, dateSubFolder] user:appDelegate.activeUser userID:appDelegate.activeUserID password:appDelegate.activePassword url:appDelegate.activeUrl encrypted:encrypted];
|
|
|
|
|
|
if ( error == nil) {
|
|
|
|
|
|
- (void)[[NCManageDatabase sharedInstance] addDirectoryWithServerUrl:[NSString stringWithFormat:@"%@/%@", folderPhotos, dateSubFolder] permissions:nil encrypted:false];
|
|
|
+ (void)[[NCManageDatabase sharedInstance] addDirectoryWithServerUrl:[NSString stringWithFormat:@"%@/%@", folderPhotos, dateSubFolder] permissions:nil encrypted:encrypted];
|
|
|
|
|
|
} else {
|
|
|
|