hit.setValue("LSUB (" + attributes + ") \"/\" " + encodeFolder((String) hit.getKey()));
hit.setValue("LSUB (" + attributes + ") \"/\" " + ImapFolder.encodeFolder((String) hit.getKey()));
    boolean doLSUB(String tag, List args) throws IOException {        if (!checkState(tag, ImapSession.STATE_AUTHENTICATED))            return CONTINUE_PROCESSING;        String referenceName = (String) args.remove(0);        String mailboxName   = (String) args.remove(0);        String pattern = mailboxName;        if (!mailboxName.startsWith("/")) {            if (referenceName.endsWith("/"))  pattern = referenceName + mailboxName;            else                              pattern = referenceName + '/' + mailboxName;        }        if (pattern.startsWith("/"))            pattern = pattern.substring(1);        try {            Map subs;            synchronized (mMailbox) {                subs = mSession.getMatchingSubscriptions(mMailbox, pattern);                for (Iterator it = subs.entrySet().iterator(); it.hasNext(); ) {                    Map.Entry hit = (Map.Entry) it.next();                    Folder folder = null;                    try {                        folder = mMailbox.getFolderByPath((String) hit.getKey());                    } catch (MailServiceException.NoSuchItemException nsie) { }                    // FIXME: need to determine "name attributes" for mailbox (\Marked, \Unmarked, \Noinferiors, \Noselect)                    boolean visible = hit.getValue() != null && ImapFolder.isFolderVisible(folder);                    String attributes = visible ? getFolderAttributes(folder) : "\\Noselect";                    hit.setValue("LSUB (" + attributes + ") \"/\" " + encodeFolder((String) hit.getKey()));                }            }            for (Iterator it = subs.values().iterator(); it.hasNext(); )                sendUntagged((String) it.next());        } catch (ServiceException e) {            ZimbraLog.imap.warn("LSUB failed", e);            sendNO(tag, "LSUB failed");            return canContinue(e);        }        sendNotifications(true, false);        sendOK(tag, "LSUB completed");        return CONTINUE_PROCESSING;    }