Closed
Bug 1764158
Opened 3 years ago
Closed 3 years ago
Folder names containing an '+' throw Folder not found error
Categories
(Thunderbird :: Add-Ons: Extensions API, defect)
Tracking
(thunderbird_esr91 wontfix)
RESOLVED
FIXED
101 Branch
| Tracking | Status | |
|---|---|---|
| thunderbird_esr91 | --- | wontfix |
People
(Reporter: mozilla, Assigned: john)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
Steps to reproduce:
- Have an account with a folder with a name containing an
+char - Use Webextension APIs to iterate over all existing folders of that account, e.g. like this:
let traverseAccount = (account) => {
let arrayOfFolders = []
// recursive function to traverse all subfolders
function traverse(folders) {
if (!folders) return
for (let f of folders) {
console.log(f);
arrayOfFolders.push(f)
traverse(f.subFolders)
}
}
traverse(account.folders)
return arrayOfFolders
}
let folders = traverseAccount(a) // assuming a is the corresponding account object
- Now iterate over all messages of all folders (as recommended in the docs):
await Promise.all(folders.map(async f => {
if (folder) {
page = await messenger.messages.query({ folder: folder })
if (page) {
page.messages.map(m => doSomething(m))
while (page.id) {
page = await messenger.messages.continueList(page.id)
page.messages.map(m => doSomething(m))
}
}
}
}))
Actual results:
If step 3 is executed, processing stops with the following error message (folder name is an example):
Error: Folder not found: /somefolder+
This only happens on folders in local accounts. Also it doesn't matter where exactly the + character resides. It can be anywhere in the folder name string to provoke the error message above.
Expected results:
I expect the processing of the already retrieved (!) folder list to finish without error. If the error is somehow necessary, it should provide the reason, why the folder could be retrieved but subsequently could not be found.
| Assignee | ||
Updated•3 years ago
|
Assignee: nobody → john
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
| Assignee | ||
Comment 1•3 years ago
|
||
| Assignee | ||
Updated•3 years ago
|
Keywords: checkin-needed-tb
Updated•3 years ago
|
status-thunderbird_esr91:
--- → wontfix
Target Milestone: --- → 101 Branch
Pushed by mkmelin@iki.fi:
https://hg.mozilla.org/comm-central/rev/ed22b20dcf36
Handle + sign separatly in human readable path. r=mkmelin
Pushed by mkmelin@iki.fi:
https://hg.mozilla.org/comm-central/rev/fc424c1e930b
follow-up, fix linting. rs=eslint
Updated•3 years ago
|
Blocks: folders-with-special-characters
You need to log in
before you can comment on or make changes to this bug.
Description
•