Comparing version 1.0.37 to 1.0.38
@@ -15,3 +15,3 @@ 'use strict'; | ||
let entries = []; | ||
response = await connection.exec(listCommand, [normalizePath(connection, reference || ''), normalizePath(connection, mailbox || '')], { | ||
response = await connection.exec(listCommand, [normalizePath(connection, reference || ''), normalizePath(connection, mailbox || '', true)], { | ||
untagged: { | ||
@@ -73,3 +73,3 @@ [listCommand]: async untagged => { | ||
response = await connection.exec('LSUB', [reference || '', mailbox || ''], { | ||
response = await connection.exec('LSUB', [normalizePath(connection, reference || ''), normalizePath(connection, mailbox || '', true)], { | ||
untagged: { | ||
@@ -76,0 +76,0 @@ LSUB: async untagged => { |
@@ -11,3 +11,3 @@ 'use strict'; | ||
module.exports = { | ||
normalizePath(connection, path) { | ||
normalizePath(connection, path, skipNamespace) { | ||
if (Array.isArray(path)) { | ||
@@ -39,3 +39,3 @@ path = path.join((connection.namespace && connection.namespace.delimiter) || '.'); | ||
// ensure namespace prefix if needed | ||
if (connection.namespace && connection.namespace.prefix && path.indexOf(connection.namespace.prefix) !== 0) { | ||
if (!skipNamespace && connection.namespace && connection.namespace.prefix && path.indexOf(connection.namespace.prefix) !== 0) { | ||
path = connection.namespace.prefix + path; | ||
@@ -42,0 +42,0 @@ } |
{ | ||
"name": "imapflow", | ||
"version": "1.0.37", | ||
"version": "1.0.38", | ||
"description": "IMAP Client for Node", | ||
@@ -5,0 +5,0 @@ "main": "./lib/imap-flow.js", |
519651