paul@3 | 1 | Description: Always specify options to GETMETADATA. |
paul@3 | 2 | Some IMAP servers (Cyrus, apparently) insist on receiving options. |
paul@3 | 3 | This patch adds the apparently mandatory DEPTH option. |
paul@3 | 4 | |
paul@3 | 5 | --- a/kimap/getmetadatajob.cpp |
paul@3 | 6 | +++ b/kimap/getmetadatajob.cpp |
paul@3 | 7 | @@ -88,15 +88,11 @@ |
paul@3 | 8 | parameters.truncate(parameters.length() -1); |
paul@3 | 9 | |
paul@3 | 10 | } else { |
paul@3 | 11 | - if (d->depth != "0") { |
paul@3 | 12 | - parameters += "(DEPTH " + d->depth; |
paul@3 | 13 | - } |
paul@3 | 14 | + parameters += "(DEPTH " + d->depth; |
paul@3 | 15 | if (d->maxSize != -1) { |
paul@3 | 16 | - parameters += "(MAXSIZE " + QByteArray::number(d->maxSize) + ')'; |
paul@3 | 17 | - } |
paul@3 | 18 | - if (d->depth != "0") { |
paul@3 | 19 | - parameters += " )"; |
paul@3 | 20 | + parameters += " MAXSIZE " + QByteArray::number(d->maxSize); |
paul@3 | 21 | } |
paul@3 | 22 | + parameters += ") "; |
paul@3 | 23 | |
paul@3 | 24 | if (d->entries.size() > 1) |
paul@3 | 25 | parameters += '('; |
paul@3 | 26 | @@ -105,6 +101,8 @@ |
paul@3 | 27 | } |
paul@3 | 28 | if (d->entries.size() > 1) |
paul@3 | 29 | parameters[parameters.length() -1 ] = ')'; |
paul@3 | 30 | + else |
paul@3 | 31 | + parameters.truncate(parameters.length() -1); |
paul@3 | 32 | } |
paul@3 | 33 | |
paul@3 | 34 | if (d->entries.isEmpty()) { |
paul@3 | 35 | @@ -209,4 +207,4 @@ |
paul@3 | 36 | return d->metadata[mailBox]; |
paul@3 | 37 | } |
paul@3 | 38 | |
paul@3 | 39 | -#include "getmetadatajob.moc" |
paul@3 | 40 | \ No newline at end of file |
paul@3 | 41 | +#include "getmetadatajob.moc" |