allow flags with backslash in append

https://github.com/mscdex/node-imap/issues/186
fork
Dominik Gehl 11 years ago
parent e963bb791a
commit bf9984f063

@ -259,8 +259,13 @@ Connection.prototype.append = function(data, options, cb) {
if (options.flags) {
if (!Array.isArray(options.flags))
options.flags = [options.flags];
if (options.flags.length > 0)
cmd += ' (\\' + options.flags.join(' \\') + ')';
if (options.flags.length > 0) {
for (var i = 0, len = options.flags.length; i < len; ++i) {
if (options.flags[i][0] !== '\\')
options.flags[i] = '\\' + options.flags[i];
}
cmd += ' (' + options.flags.join(' ') + ')';
}
}
if (options.date) {
if (!isDate(options.date))

Loading…
Cancel
Save