浏览代码

Merge pull request #1299 from nextcloud/fix-white-spaces

Fix trailing and leading spaces in folder name
Marino Faggiana 4 年之前
父节点
当前提交
8b48487168
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      iOSClient/Main/CCMain.m

+ 1 - 1
iOSClient/Main/CCMain.m

@@ -1425,7 +1425,7 @@
         
         UITextField *fileName = alertController.textFields.firstObject;
         
-        [[NCNetworking shared] createFolderWithFileName:fileName.text serverUrl:serverUrl account:appDelegate.activeAccount url:appDelegate.activeUrl overwrite:false completion:^(NSInteger errorCode, NSString *errorDescription) { }];
+        [[NCNetworking shared] createFolderWithFileName:[fileName.text stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]] serverUrl:serverUrl account:appDelegate.activeAccount url:appDelegate.activeUrl overwrite:false completion:^(NSInteger errorCode, NSString *errorDescription) { }];
     }];
     
     okAction.enabled = NO;