Saving draft or sending message may lead to NotAllowedError: Could not remove the file at C:\Users\xxxxx\AppData\Local\Temp\nscopy.tmp in console
Categories
(MailNews Core :: Composition, defect)
Tracking
(thunderbird_esr91 wontfix)
Tracking | Status | |
---|---|---|
thunderbird_esr91 | --- | wontfix |
People
(Reporter: rachel, Assigned: rnons)
References
(Regression)
Details
(Keywords: regression)
Attachments
(1 file)
1.04 KB,
patch
|
mkmelin
:
review+
|
Details | Diff | Splinter Review |
The file is also seen in the said directory, and it is not removed when the application closes. However, it is removed when TB starts again. Seen in TB 97 and trunk using the new JS module for news.
Maybe this is intended behaviour.
Assignee | ||
Comment 1•3 years ago
•
|
||
I think this is related to MessageSend.jsm, not nntp-js, and it's a windows only problem. The code is at https://searchfox.org/comm-central/rev/44aa77c6da7c13b659667b96eb3c149e2096d0f1/mailnews/compose/src/MessageSend.jsm#1012. I have seen it reported elsewhere but never managed to reproduce it. Can you also reproduce when sending/saving a message with imap/pop3 account?
What if you try to delete it manually by IOUtils.remove()
or delete it from File Manager? I'm trying to understand if it's because the file handler is not released after sending.
Reporter | ||
Comment 2•3 years ago
|
||
To answer your questions: Using TB 97 b2 this also happens when saving a draft for a mail message if the drafts folder is a local folder. Deleting the file from the file manager succeeds, as does await IOUtils.remove("C:\\Users\\rachel\\AppData\\Local\\Temp\\nscopy.tmp")
, we checked that the file is really deleted. So it looks like it's still locked when the sending code tries to delete it, but not later when the deletion is executed manually.
It doesn't happen in TB 91 for mail using the new JS send/SMTP modules.
Assignee | ||
Comment 3•3 years ago
|
||
(In reply to Rachel Martin from comment #2)
Using TB 97 b2 this also happens when saving a draft for a mail message if the drafts folder is a local folder.
True, I can reproduce now, but don't know how to fix it.
Reporter | ||
Comment 5•3 years ago
|
||
Apologies, we also see the issue in TB 91. Here's our fix:
https://github.com/Betterbird/thunderbird-patches/blob/main/91/bugs/1751461-file-lock.patch
As far as we can see, the files now get deleted and there is no error in the console.
Assignee | ||
Comment 6•3 years ago
|
||
Thanks a lot.
Assignee | ||
Updated•3 years ago
|
Reporter | ||
Updated•3 years ago
|
Updated•3 years ago
|
Updated•3 years ago
|
Pushed by mkmelin@iki.fi:
https://hg.mozilla.org/comm-central/rev/5090da789272
Delay cleanup until OnStopCopy() has run to avoid file locking on Windows. r=mkmelin
Updated•3 years ago
|
Description
•