|
@@ -394,8 +394,9 @@
|
|
- (void)dismissSelectWithServerUrl:(NSString *)serverUrl metadata:(tableMetadata *)metadata type:(NSString *)type items:(NSArray *)items overwrite:(BOOL)overwrite copy:(BOOL)copy move:(BOOL)move
|
|
- (void)dismissSelectWithServerUrl:(NSString *)serverUrl metadata:(tableMetadata *)metadata type:(NSString *)type items:(NSArray *)items overwrite:(BOOL)overwrite copy:(BOOL)copy move:(BOOL)move
|
|
{
|
|
{
|
|
if (serverUrl != nil) {
|
|
if (serverUrl != nil) {
|
|
-
|
|
|
|
- if ([serverUrl isEqualToString:[[NCUtilityFileSystem shared] getHomeServerWithAccount:appDelegate.account]]) {
|
|
|
|
|
|
+
|
|
|
|
+ NSString* home = [[NCUtilityFileSystem shared] getHomeServerWithAccount:appDelegate.account];
|
|
|
|
+ if ([serverUrl isEqualToString:home]) {
|
|
NKError *error = [[NKError alloc] initWithErrorCode:NCGlobal.shared.errorInternalError errorDescription:@"_autoupload_error_select_folder_"];
|
|
NKError *error = [[NKError alloc] initWithErrorCode:NCGlobal.shared.errorInternalError errorDescription:@"_autoupload_error_select_folder_"];
|
|
[[NCContentPresenter shared] messageNotification:@"_error_" error:error delay:[[NCGlobal shared] dismissAfterSecond] type:messageTypeError];
|
|
[[NCContentPresenter shared] messageNotification:@"_error_" error:error delay:[[NCGlobal shared] dismissAfterSecond] type:messageTypeError];
|
|
return;
|
|
return;
|
|
@@ -403,7 +404,10 @@
|
|
|
|
|
|
// Settings new folder Automatatic upload
|
|
// Settings new folder Automatatic upload
|
|
[[NCManageDatabase shared] setAccountAutoUploadFileName:serverUrl.lastPathComponent];
|
|
[[NCManageDatabase shared] setAccountAutoUploadFileName:serverUrl.lastPathComponent];
|
|
- [[NCManageDatabase shared] setAccountAutoUploadDirectory:[[NCUtilityFileSystem shared] deletingLastPathComponentWithAccount:appDelegate.account serverUrl:serverUrl] urlBase:appDelegate.urlBase account:appDelegate.account];
|
|
|
|
|
|
+ NSString *path = [[NCUtilityFileSystem shared] deleteLastPathWithServerUrlPath:serverUrl home:home];
|
|
|
|
+ if (path != nil) {
|
|
|
|
+ [[NCManageDatabase shared] setAccountAutoUploadDirectory:path urlBase:appDelegate.urlBase account:appDelegate.account];
|
|
|
|
+ }
|
|
// Reload
|
|
// Reload
|
|
[self.tableView reloadData];
|
|
[self.tableView reloadData];
|
|
}
|
|
}
|