Closed Bug 1835556 Opened 3 years ago Closed 6 months ago

Moving virtual folder within maildir based imap or local folder sometimes fails

Categories

(MailNews Core :: Backend, defect, P3)

Thunderbird 102
defect

Tracking

(thunderbird_esr140 affected, thunderbird147 affected)

RESOLVED FIXED
147 Branch
Tracking Status
thunderbird_esr140 --- affected
thunderbird147 --- affected

People

(Reporter: gds, Assigned: welpy-cw)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

This is pretty obscure bug (or bugs) that I noticed while testing the addition of context (right-click) selected move and copy of folders, bug 1831759.

Moving a virtual (search) folder within Local Folders that are maildir based, the move does not occur. See this error on console:

[Parent 1054589, Main Thread] WARNING: NS_ENSURE_SUCCESS(rv, rv) failed with result 0x80520012 (NS_ERROR_FILE_NOT_FOUND): file /home/gene/mozilla2/comm/mailnews/local/src/nsMsgMaildirStore.cpp:438
JavaScript error: chrome://messenger/content/about3Pane.js, line 2458: NS_ERROR_FILE_NOT_FOUND: Component returned failure code: 0x80520012 (NS_ERROR_FILE_NOT_FOUND) [nsIMsgCopyService.copyFolder]

Move of virtual folder works OK on mbox based Local Folders.

When moving a virtual folder within an imap account/server, you can move it to any folder one time within a session. If you try to move it more than once back to the same folder, often the move does not occur. It also sometimes hits an "ENSURE_SUCCESS(rv, rv) here:
https://searchfox.org/comm-central/rev/a8a527d3a13553a492016f9dba13f09c758e1afc/mailnews/imap/src/nsImapMailFolder.cpp#7383
failing with NS_ERROR_FILE_ALREADY_EXISTS which will prevent the move. It works better with that line commented out, but doesn't really fix the problem.
Restarting tb clears the confusion and you can move the virtual folder anywhere within the same imap account again one time.

This doesn't seem to be caused by my bug 1831759 changes since I see the same problem using d&d of the virtual folder.

Severity: -- → S3
Priority: -- → P3

supernova related?

(In reply to Wayne Mery (:wsmwk) from comment #1)

supernova related?

I don't think so. I just tried it with 102 and see the same thing.

Version: Trunk → Thunderbird 102
Summary: Moving virtual folder within imap or local folder sometimes doesn't' occur → Moving virtual folder within maildir based imap or local folder sometimes fails
Assignee: nobody → h.w.forms
Status: NEW → ASSIGNED
See Also: → 533766

Is this related to bug 533766?

(In reply to gene smith from comment #0)

Moving a virtual (search) folder within Local Folders that are maildir based, the move does not occur. See this error on console:

[Parent 1054589, Main Thread] WARNING: NS_ENSURE_SUCCESS(rv, rv) failed with result 0x80520012 (NS_ERROR_FILE_NOT_FOUND): file /home/gene/mozilla2/comm/mailnews/local/src/nsMsgMaildirStore.cpp:438
JavaScript error: chrome://messenger/content/about3Pane.js, line 2458: NS_ERROR_FILE_NOT_FOUND: Component returned failure code: 0x80520012 (NS_ERROR_FILE_NOT_FOUND) [nsIMsgCopyService.copyFolder]

When a saved search is created, the mbox store creates an empty folder with the same name, while the maildir store does not. Moving such a virtual folder subsequently fails in https://searchfox.org/comm-central/rev/c74bfa0d95156f9f98329f250a0494bb31cf2a60/mailnews/local/src/nsMsgMaildirStore.cpp#594.

Move of virtual folder works OK on mbox based Local Folders.

When moving a virtual folder within an imap account/server, you can move it to any folder one time within a session. If you try to move it more than once back to the same folder, often the move does not occur. It also sometimes hits an "ENSURE_SUCCESS(rv, rv) here:
https://searchfox.org/comm-central/rev/a8a527d3a13553a492016f9dba13f09c758e1afc/mailnews/imap/src/nsImapMailFolder.cpp#7383
failing with NS_ERROR_FILE_ALREADY_EXISTS which will prevent the move. It works better with that line commented out, but doesn't really fix the problem.
Restarting tb clears the confusion and you can move the virtual folder anywhere within the same imap account again one time.

This is bug 533766 and has just been fixed. So xrefing this is fine, Francesco.

Target Milestone: --- → 147 Branch

Pushed by geoff@darktrojan.net:
https://hg.mozilla.org/comm-central/rev/49a8cff5206a
Fix moving Maildir-based virtual folders. r=BenC

Status: ASSIGNED → RESOLVED
Closed: 6 months ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: