Closed Bug 257986 Opened 21 years ago Closed 21 years ago

Problem deleting local folders with forward slashes in the folder name

Categories

(Thunderbird :: General, defect)

x86
Windows 2000
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Thunderbird0.9

People

(Reporter: mscott, Assigned: mscott)

Details

(Keywords: fixed-aviary1.0)

Attachments

(1 file)

We now allow you to create local folders with forward slashes in them due to Bug #219586. However, if you delete the folder, we create it under Trash, but we aren't taking into consideration the fact that the folderName contains forward slashes when we Add the folder to the trash. Here's a way to re-produce: "...I am unable to delete this feed at all: http://rss.news.yahoo.com/rss/oped. Despite repeated attempts to try to delete it, it never gets moved to the trash folder. I have no problem deleting any other Yahoo RSS feeds. This is the only troublesome one."
Attached patch possible fixSplinter Review
Possible fix. This modifies nsMsgLocalMailFolder::CopyFolderLocal which gets triggered when we are moving a local rss folder to trash. Before, we took the folder name (which can now contain slashes), we created a new folder under trash with that name and then copied the contents over. This makes us generate a safe hash for the folder name and we use that in our call to AddFolder. We then set the pretty name appropriately. Furthermore, we still pass in the regular folder name into CheckIfFolderExists, I didn't change that. So if you are deleting a folder to trash and we already have a folder in the trash that has the same name (regardless of the actual disk name), we still alert you that a folder with that name already exists.
alternatively we could use the same disk name of the original folder (by getting the leaf name of the folder path) instead of re-hashing the folder name.
Comment on attachment 157849 [details] [diff] [review] possible fix sr for trunk testing consideration. See comment #1 and comment #2 for another idea on how we could fix this
Attachment #157849 - Flags: superreview?(bienvenu)
Attachment #157849 - Flags: superreview?(bienvenu) → superreview+
Status: NEW → ASSIGNED
Target Milestone: --- → Thunderbird0.9
fixed on the branch and the trunk
Status: ASSIGNED → RESOLVED
Closed: 21 years ago
Keywords: fixed-aviary1.0
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: