소스 검색

trim withespaces in save func in NCCreateFormUploadDocuments

Signed-off-by: McP4nth3r <burg41@yahoo.de>
McP4nth3r 3 년 전
부모
커밋
40df873b2f
1개의 변경된 파일3개의 추가작업 그리고 0개의 파일을 삭제
  1. 3 0
      iOSClient/Main/Create cloud/NCCreateFormUploadDocuments.swift

+ 3 - 0
iOSClient/Main/Create cloud/NCCreateFormUploadDocuments.swift

@@ -274,6 +274,9 @@ import XLForm
             return
         } else {
 
+            //Trim whitespaces after checks above
+            fileNameForm = fileNameForm.trimmingCharacters(in: .whitespacesAndNewlines)
+
             let result = NCCommunicationCommon.shared.getInternalType(fileName: fileNameForm as! String, mimeType: "", directory: false)
             if NCUtility.shared.isDirectEditing(account: appDelegate.account, contentType: result.mimeType).count == 0 {
                 fileNameForm = (fileNameForm as! NSString).deletingPathExtension + "." + fileNameExtension