소스 검색

add another NPE check

Signed-off-by: tobiasKaminsky <tobias@kaminsky.me>
tobiasKaminsky 7 년 전
부모
커밋
3af569988d
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      src/main/java/com/owncloud/android/operations/UploadFileOperation.java

+ 1 - 1
src/main/java/com/owncloud/android/operations/UploadFileOperation.java

@@ -373,7 +373,7 @@ public class UploadFileOperation extends SyncOperation {
         OCFile parent = getStorageManager().getFileByPath(remoteParentPath);
 
         // in case of a fresh upload with subfolder, where parent does not exist yet
-        if (parent == null && mFolderUnlockToken.isEmpty()) {
+        if (parent == null && (mFolderUnlockToken == null || mFolderUnlockToken.isEmpty())) {
             // try to create folder
             RemoteOperationResult result = grantFolderExistence(remoteParentPath, client);