fix: throw NoSuchCloudFileException if API Error Code is 2002

This commit is contained in:
Manuel Jenny 2021-03-25 20:29:51 +01:00
parent fe87ae3126
commit e1bc82b89a
No known key found for this signature in database
GPG Key ID: 1C80FE62B2BEAA18

View File

@ -71,7 +71,8 @@ public class PCloudApiError {
}
public static boolean isNoSuchCloudFileException(int errorCode) {
return errorCode == PCloudApiErrorCodes.FILE_NOT_FOUND.getValue()
return errorCode == PCloudApiErrorCodes.COMPONENT_OF_PARENT_DIRECTORY_DOES_NOT_EXIST.getValue()
|| errorCode == PCloudApiErrorCodes.FILE_NOT_FOUND.getValue()
|| errorCode == PCloudApiErrorCodes.FILE_OR_FOLDER_NOT_FOUND.getValue()
|| errorCode == PCloudApiErrorCodes.DIRECTORY_DOES_NOT_EXIST.getValue();
}