It's not what rm -r does, and it leads to all kinds of unexpected behaviour when the nsIFile is a symlink to a directory: we recursively remove the target directory's entries, and then try to rmdir the symlink. The fix should be as simple as removing the !recursive check and just always unlinking symlinks.
Comment on attachment 368645 [details] [diff] [review] Always unlink symlinks Code looks fine to me and I'm OK with this behavior.
Attachment #368645 - Flags: review?(joshmoz) → review+
Comment on attachment 368645 [details] [diff] [review] Always unlink symlinks Does the other test I reviewed cover this bug as well? This should have tests to land.
Attachment #368645 - Flags: superreview?(benjamin) → superreview+
After discussing this with Benjamin on irc, I'll land the test as-is, then remove the work-around when I land this.
Status: NEW → RESOLVED
Last Resolved: 9 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.