Closed
Bug 498735
Opened 15 years ago
Closed 15 years ago
rmtree doesn't remove read-only files on Windows
Categories
(Thunderbird :: General, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
Thunderbird 3.0b3
People
(Reporter: rain1, Assigned: rain1)
Details
Attachments
(1 file)
1.94 KB,
patch
|
standard8
:
review+
|
Details | Diff | Splinter Review |
rmtree doesn't cope with read-only files on Windows, so do it ourselves.
Attachment #383541 -
Flags: review?(bugzilla)
Assignee | ||
Updated•15 years ago
|
Assignee: nobody → sid.bugzilla
Status: NEW → ASSIGNED
Comment 1•15 years ago
|
||
I've been running with this patch for a while w/o problems, and when I accidentally unapplied it, things went south right away. So I think this is worth getting in so that we can run mozmill tests on windows...
Comment 2•15 years ago
|
||
I've been hesitant with getting round to this. This bit just makes me think twice:
+# From pathutils <http://www.voidspace.org.uk/python/pathutils.html>
+# by Michael Foord
+# rmtreeing read-only files fails on Windows
Looking at this again, that has a BSD license and this is test code only but with an MPL license header. I believe the two are compatible, but this makes me think twice. cc'ing gerv who I'm sure will have a better idea if it is ok just to copy/paste this code than me.
Comment 3•15 years ago
|
||
There's only six actual lines of code there, and it debatable how many different ways there are to do what you want, and therefore whether there's a copyright interest.
The easiest thing to do would be to email the developer: fuzzyman@voidspace.org.uk, and ask for permission to include it under the existing terms for the file.
Gerv
Comment 4•15 years ago
|
||
You have my permission (in as much as you needed it in the first place...) to use, modify and relicense those 6 lines of code. :-)
I'm on holiday at the moment and won't get a chance to look at the actual bug report for a few days. If the problem you are trying to solve is genuinely just removing read-only files on Windows with shutil.rmtree then the onerror handler should work fine for this purpose.
Comment 5•15 years ago
|
||
Thanks, Michael :-)
Gerv
Comment 6•15 years ago
|
||
Comment on attachment 383541 [details] [diff] [review]
patch
>+# From pathutils <http://www.voidspace.org.uk/python/pathutils.html>
>+# by Michael Foord
>+# rmtreeing read-only files fails on Windows
Based on Michael's comment, I think we can drop these lines and add Michael to the contributors list in the license header.
Thanks Michael.
r=Standard8.
Attachment #383541 -
Flags: review?(bugzilla) → review+
Assignee | ||
Comment 7•15 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Assignee | ||
Updated•15 years ago
|
Target Milestone: --- → Thunderbird 3.0b3
You need to log in
before you can comment on or make changes to this bug.
Description
•