Răsfoiți Sursa

Merge pull request #12717 from nextcloud/fix500

500 when metadata does not exist
Tobias Kaminsky 1 an în urmă
părinte
comite
a3fe427cec

+ 2 - 1
app/src/main/java/com/owncloud/android/utils/EncryptionUtils.java

@@ -1449,7 +1449,8 @@ public static String decryptStringSymmetricAsString(String string,
                                                                                 arbitraryDataProvider)
             );
 
-        } else if (getMetadataOperationResult.getHttpCode() == HttpStatus.SC_NOT_FOUND) {
+        } else if (getMetadataOperationResult.getHttpCode() == HttpStatus.SC_NOT_FOUND ||
+            getMetadataOperationResult.getHttpCode() == HttpStatus.SC_INTERNAL_SERVER_ERROR) {
             // new metadata
             metadata = new DecryptedFolderMetadataFile(new com.owncloud.android.datamodel.e2e.v2.decrypted.DecryptedMetadata(),
                                                        new ArrayList<>(),