Changeset 272
- Timestamp:
- 08/10/08 12:54:59 PM (5 months ago)
- Location:
- trunk/LogicMail/src/org/logicprobe/LogicMail/mail/imap
- Files:
-
- 2 modified
-
ImapClient.java (modified) (1 diff)
-
ImapProtocol.java (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LogicMail/src/org/logicprobe/LogicMail/mail/imap/ImapClient.java
r266 r272 325 325 FolderTreeItem childItem = getFolderItem(baseFolder, resp.name, resp.canSelect); 326 326 baseFolder.addChild(childItem); 327 if(resp.hasChildren || !childrenExtension) {327 if(resp.hasChildren || (!resp.noInferiors && !childrenExtension)) { 328 328 // The folder has children, so lets go and list them 329 329 if(depth+1 < globalConfig.getImapMaxFolderDepth()) { -
trunk/LogicMail/src/org/logicprobe/LogicMail/mail/imap/ImapProtocol.java
r266 r272 659 659 } 660 660 661 // Workaround for mail servers that sometimes append untagged 662 // replies to the end of this response 663 int lastLineIndex = rawList.length - 1; 664 while(lastLineIndex > 0 && rawList[lastLineIndex].startsWith("* ")) { 665 lastLineIndex--; 666 } 667 661 668 StringBuffer msgBuf = new StringBuffer(); 662 for(int i=1;i< rawList.length-1;i++) {669 for(int i=1;i<lastLineIndex;i++) { 663 670 msgBuf.append(rawList[i] + "\n"); 664 671 } 665 String lastLine = rawList[ rawList.length-1];672 String lastLine = rawList[lastLineIndex]; 666 673 msgBuf.append(lastLine.substring(0, lastLine.lastIndexOf(')'))); 667 674 return msgBuf.toString(); … … 759 766 public static class ListResponse { 760 767 public boolean hasChildren; 768 public boolean noInferiors; 761 769 public boolean canSelect; 762 770 public boolean marked; … … 829 837 response.canSelect = !(flagStr.indexOf("\\Noselect") != -1); 830 838 response.hasChildren = (flagStr.indexOf("\\HasChildren") != -1); 839 response.noInferiors = (flagStr.indexOf("\\Noinferiors") != -1); 831 840 response.marked = (flagStr.indexOf("\\Marked") != -1); 832 841 … … 1062 1071 1063 1072 if(connection.available() > 0) { 1064 System.err.println("-->connection.available() == " + connection.available());1065 1073 result = connection.receive(); 1066 System.err.println("-->Read in "+result.length());1067 System.err.println("-->connection.available() == " + connection.available());1068 1074 } 1069 1075 else {
