mirror of
https://github.com/moparisthebest/k-9
synced 2024-12-25 00:58:50 -05:00
Fix for index out of bounds exception (regression) from r330
This commit is contained in:
parent
7ac3fe2ebe
commit
f184350aec
@ -233,15 +233,18 @@ public class AccountSetupIncoming extends Activity implements OnClickListener {
|
||||
|
||||
for (int i = 0, count = pathParts.length; i < count; i++) {
|
||||
if (i == 0) {
|
||||
if (pathParts[0] != null) {
|
||||
if (pathParts[0] != null &&
|
||||
pathParts[0].length() > 1) {
|
||||
mWebdavPathPrefixView.setText(pathParts[0].substring(1));
|
||||
}
|
||||
} else if (i == 1) {
|
||||
if (pathParts[1] != null) {
|
||||
if (pathParts[1] != null &&
|
||||
pathParts[1].length() > 1) {
|
||||
mWebdavAuthPathView.setText(pathParts[1]);
|
||||
}
|
||||
} else if (i == 2) {
|
||||
if (pathParts[2] != null ) {
|
||||
if (pathParts[2] != null &&
|
||||
pathParts[2].length() > 1) {
|
||||
mWebdavMailboxPathView.setText(pathParts[2]);
|
||||
}
|
||||
}
|
||||
|
@ -140,7 +140,8 @@ public class WebDavStore extends Store {
|
||||
|
||||
for (int i = 0, count = pathParts.length; i < count; i++) {
|
||||
if (i == 0) {
|
||||
if (pathParts[0] != null) {
|
||||
if (pathParts[0] != null &&
|
||||
pathParts[0].length() > 1) {
|
||||
if (!pathParts[0].substring(1).equals("")) {
|
||||
mPath = pathParts[0].substring(1);
|
||||
} else {
|
||||
@ -150,11 +151,13 @@ public class WebDavStore extends Store {
|
||||
mPath = "";
|
||||
}
|
||||
} else if (i == 1) {
|
||||
if (pathParts[1] != null) {
|
||||
if (pathParts[1] != null &&
|
||||
pathParts[1].length() > 1) {
|
||||
mAuthPath = "/" + pathParts[1];
|
||||
}
|
||||
} else if (i == 2) {
|
||||
if (pathParts[2] != null) {
|
||||
if (pathParts[2] != null &&
|
||||
pathParts[2].length() > 1) {
|
||||
mMailboxPath = "/" + pathParts[2];
|
||||
if (mPath == null ||
|
||||
mPath.equals("")) {
|
||||
|
Loading…
Reference in New Issue
Block a user